[Android] faces appear semi transparent on one side
I have already some experience in open GL ES on Android but I am new to this forum.
I am trying to model a plane on my phone, but I realise that some of the faces of my model appear semi transparent on one side. I have the following setup code:
gl.glViewport(0, 0, width, height);
(light setup ...)
GLU.gluPerspective(gl, 60.0f, (float)width/(float)height, 0.1f, 100.0f);
And before drawing my vertices, I do
Even though I have disabled GL_CULL_FACE, I still have the following result:
gl.glMaterialfv(GL10.GL_FRONT_AND_BACK, GL10.GL_AMBIENT_AND_DIFFUSE, _ltsAmbiantAndDiffuses[i]);
gl.glMaterialfv(GL10.GL_FRONT_AND_BACK, GL10.GL_SPECULAR, _ltsSpeculars[i]);
gl.glMaterialf(GL10.GL_FRONT_AND_BACK, GL10.GL_SHININESS, 25.0f);
I can see two shades of white even though all materials have the same colour. One clearly white which is opaque, and one more grey which is semi transparent. When I look at the surface from the top of from the bottom the same face is either grey or white, hence it seems that it is semi transparent only on one side.
Does anyone have an idea about what I could be doing wrong?
Thanks a lot
Re: [Android] faces appear semi transparent on one side
DO you have appropriate near and far clip planes? It looks like you have a lack of Z culling...but you seem to have enabled the depth buffer....maybe extreme poor precision?