Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Depth buffer rendered over objects

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member Newbie
    Join Date
    Jul 2013

    Depth buffer rendered over objects


    I'm having a bit of a problem with the depth buffer. When I'm using blending, it seems that the depth buffer gets mixed together with the blended image. As soon as I call glDisable(GL_DEPTH_TEST), the entire contents of the depth buffer get written over the render target. If I keep the depth buffer on but disable blending, everything is fine. Here's what I mean:

    Here's the render code:
    Code :
    // render the particles
    glDrawArraysInstanced(GL_TRIANGLES, 0, model_.getVertCount(), NUM_OF_PARTICLES);

    No clue as to what's going on. Any help would be appreciated!

    Thanks in advance!

    EDIT: Just before I went to bed I got an idea and it worked: enabling back face culling removed the issue. I was trying to find a way to delete the topic as to not clutter the forums but I couldn't find a button for it. Anyway, if anyone experiences similar artifacts then here's your solution! ^^
    Last edited by dr4cula; 08-28-2013 at 03:38 PM.

Posting Permissions

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