yangweigbh / Libgdx-CardBoard-Extension

Android CardBoard SDK development using Libgdx
67 stars 16 forks source link

GL20.glScissor() not functioning as it should #12

Open Wulf opened 7 years ago

Wulf commented 7 years ago

LibGDX's ScrollPane uses glScissor in it's draw method. On desktop and normal android (non-vr), it renders the ScrollPane just fine. When I run the same code in android (vr) using this extension, it doesn't render the children of the ScrollPane (in other words, the scrollpane's widget).

EtK2000 commented 7 years ago

Where did you render the ScrollPane? Try to draw it in the eye drawing and not in render(). If that doesn't work, send an example code and I'll check it out.

Wulf commented 7 years ago

Yup, I was rendering a Stage in the eye drawing method. The Stage had a ScrollPane with many Labels. It didn't render the labels, but it rendered the scroll pane just fine (scroll bars even worked).

Moreover, if you try to render a TextField and touch it to activate the on-screen keyboard, it crashes the app. I guess that's expected though since it's VR, and not some touch-screen app.

I'll try my best, but might not get that example code anytime soon.