Hi everybody,
I'm developing an Android AR application using Vuforia (for target recognition) and JPCT-AE for the rendering of 3D objects.
I have a problem with depth sorting: when I try to render a teapot, it shows also elements that should not be present (like the handle, when I look at the teapot facing the beak).
I searched over internet, and (if I understood correctly) it is related to OpenGL and how it manages the depth rendering. However, even if I added some lines to the code (when I initialize the renderer):
GLES20.glEnable(GLES20.GL_BLEND);
GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);
GLES20.glEnable(GLES20.GL_FRAGMENT_SHADER);
GLES20.glEnable(GLES20.GL_DEPTH_TEST);
GLES20.glEnable(GLES20.GL_TRUE);
GLES20.glDepthFunc(GLES20.GL_LESS);
GLES20.glDepthMask(GLES20.GL_TRUE);
GLES20.glClearDepthf(1.0f);
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
it didn't change. Can you help me?
Anyway, thanks for your amazing work.