Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: glDepthMask / NVidia

  1. #1
    Junior Member Regular Contributor
    Join Date
    Aug 2001
    Location
    San Diego, CA
    Posts
    136

    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

  2. #2
    Junior Member Regular Contributor
    Join Date
    Aug 2001
    Location
    San Diego, CA
    Posts
    136

    Re: glDepthMask / NVidia

    Originally posted by amendol:

    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



    OH, this is not a problem, it is made to work like this
    http://www.opengl.org/discussion_boa...ML/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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •