Disabling depth write trashes the frame buffer on some GPUs

Posted by EboMike on Game Development See other posts from Game Development or by EboMike
Published on 2011-03-05T00:27:33Z Indexed on 2011/03/05 7:32 UTC
Read the original article Hit count: 486

Filed under:
|
|

I sometimes disable depth buffer writing via glDepthMask(GL_FALSE) during the alpha rendering of a frame. That works perfectly fine on some GPUs (like the Motorola Droid's PowerVR), but on the HTC EVO with the Adreno GPU for example, I end up with the frame buffer being complete garbage (I see traces of the meshes I rendered somewhere, but the entire screen is mostly trashed).

If I force glDepthMask to be true the entire time, everything works fine.

I need glDepthMask to be off during parts of the alpha rendering. What can cause the framebuffer to get destroyed by turning the depth writing off?

I do clear the depth buffer initially, and the majority of the screen has pixels rendered with depth writing turned on first before I do additional drawing with it turned off.

© Game Development or respective owner

Related posts about android

Related posts about opengl-es