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.
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.