I'm trying to write program that draws complex non-convex object. But I have problem - some faces appear to be transparent. I partially solved this by adding
GLES20.glEnable(GLES20.GL_CULL_FACE);
But after that I found out that it doesn't work if there are two faces with the same direction of their normals and one placed behind the other. In this case Open GL renders incorrectly.
Also I tried to add
GLES20.glEnable(GLES20.GL_DEPTH_TEST)
but I didn't attain the aim. Moreover, a half of the object vanished. Could you please explain me, where am I wrong?
P.S. To get object vertices I used Blender(I exported its data into obj file). Also I checked this data - there is right order of vertices(CCW).