OGLES2 depth buffer on Android
-
What is different about how this operates on Android please? My app (which works on desktop, BB10 & Harmattan) doesn't enable the depth buffer correctly on Android.
I currently use:
@ glEnable(GL_DEPTH_TEST);
@Do I need to initialise it using extra commands? I've also tried:
@
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glDepthMask(true);
@But it still doesn't work. Any advice appreciated.
-
A screenshot of the same code working on Harmattan (and same for BB10 and desktop):
!http://2.bp.blogspot.com/-H1U0QO6_N18/UmMB_lr6h-I/AAAAAAAAAII/uTw-CVj0zOQ/s320/screenshotC2.png(Depth test working)!and compiled for Android 4.3. The depth testing is obviously not working (please ignore colour differences):
!http://3.bp.blogspot.com/-lt0TEYMK8xM/UmMBtR4dCuI/AAAAAAAAAIA/ya-K_h86FSI/s320/Screenshot_2013-10-18-07-57-25.png(Compiled for Android 4.3)!Does this ring any bells with anyone? All help appreciated!