Trasparency without blending and alpha

Hi All,

I have taken some teapot data and I am trying to render it using OpenGL ES using vertex array. I can see that the teapot is looking trasparent, though I have disabled blending and alpha tests.

Can some one tell me if there is any other reason to see a transparent image. Could the order of the vertices have anything to with this ?

Thanks & regards,

Is this refering to the reference implementation?


I’ve taken the data from the KLimt teapot example and I am using the reference implementation for rendering. I’ve disabled blending.

The rim of top lid of the teapot is visible when the teapot is rotated upside down also…

Thanks & regards,

This seems to be a depth test issue.
Have you enabled it?

Hi !

I had not enabled the depth test . When I enable it with GL_LEQUAL or GL_GEQUAL as the depth func only part of the teapot is visible. But when I enable GL_NOTEQUAL, most of the teapot is visible with the same trasparency problem.

The same data is working fine in KLimt, the only difference being the commands used in KLimt are Vertex3fv and Normal3fv where as I am using VertexPointer and NormalPointer.

Thanks & regards,

Set the depth test function to GL_LESS (default):

Enable depth test:

and, at every frame, remember to clear the depth buffer (and, if it’s your case, color buffer :slight_smile: )

Make you sure that the EGLConfig you are using has a depth buffer.

There’s no matter how you are sending geometry data to the GL pipeline: glVertex* or glVertexPointer achieve the same effect.


Dear Marco !

Thanks a lot :slight_smile: It solved the problem. I wasnt clearing the depth buffer each time, that was probably responsible for the partial images in the later frames.
Enabling depth test & clearing properly solved the problem.

Thanks again :slight_smile:

Best regards,

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.