glDepthMask / NVidia

I am trying to get my transparent objects to work nicely, and am seeing some problems that look like driver problems.

I am developing on two different systems. One is a dell 8000 laptop with an NVidia card using the 1251 driver. The other is a desktop with a Geforce 2 GTS /64Meg. Using the same driver.

I am trying to mix my alpha objects with my opaque objects in a simmilar manner given in the example on page 230 of the OpenGL redbook, Version 1.2.

I am first drawing the opaque objects with the depth buffer turned on, blending turned off, and depth testing enabled.

I then draw the transparent objects with blend enabled (using: GL_SRC_ALPHA, GL_ONE). And depth test disabled, but the depth buffer still on.

As soon as I turn off depth testing. The opaque objects are no longer drawn. – at least they are not visible on the screen, but their depth values are written, because the transparent objects are still drawn, and they are correctly depth tested – they do not draw over the positions of the opaque objects.

If I comment out the call to:

glDepthMask(GL_FALSE);

everything draws as expected.

If I do this sequence instead:

glDepthMask(GL_FALSE);
glDepthMask(GL_TRUE);

The opaque objects dissapear again.

This looks like a driver problem to me, as this should have no effect.

Jamie

Originally posted by amendol:
[b]
I am trying to get my transparent objects to work nicely, and am seeing some problems that look like driver problems.

I am developing on two different systems. One is a dell 8000 laptop with an NVidia card using the 1251 driver. The other is a desktop with a Geforce 2 GTS /64Meg. Using the same driver.

I am trying to mix my alpha objects with my opaque objects in a simmilar manner given in the example on page 230 of the OpenGL redbook, Version 1.2.

I am first drawing the opaque objects with the depth buffer turned on, blending turned off, and depth testing enabled.

I then draw the transparent objects with blend enabled (using: GL_SRC_ALPHA, GL_ONE). And depth test disabled, but the depth buffer still on.

As soon as I turn off depth testing. The opaque objects are no longer drawn. – at least they are not visible on the screen, but their depth values are written, because the transparent objects are still drawn, and they are correctly depth tested – they do not draw over the positions of the opaque objects.

If I comment out the call to:

glDepthMask(GL_FALSE);

everything draws as expected.

If I do this sequence instead:

glDepthMask(GL_FALSE);
glDepthMask(GL_TRUE);

The opaque objects dissapear again.

This looks like a driver problem to me, as this should have no effect.

Jamie

[/b]

OH, this is not a problem, it is made to work like this
http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/003042.html

when I set the depth mask to false, the depth buffer no longer gets cleared.

I turn it back on before a clear, and all is now well…

Jamie

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