kreyszig
10-03-2008, 08:27 AM
Hi,
I'm drawing a series of cylinders, and need to be able to render them both as full cylinders and also as a GL_LINE_STRIP.
I've been having trouble though with what looks like a depth test issue when using GL_LINE_STRIP.
Each line strip is drawn seperately, and I call GL_ENABLE(GL_DEPTH_TEST) before I draw each strip (don't ask!). I am using GL_LESS and have tried setting the near plane to a value other than zero. The depth buffer is not being cleared between each line strip, but I am still getting some line strips drawn in front of others that I know are behind - I am verifying this by using a fragment shader that colours according to the distance from a fixed point.
Any thoughts on what could be causing this? I'm on an nvidia 6800 with 175.19 drivers.
Your help much appreciated
EDIT: I tried disabling GL_DEPTH_TEST and get exactly the same result.
I'm drawing a series of cylinders, and need to be able to render them both as full cylinders and also as a GL_LINE_STRIP.
I've been having trouble though with what looks like a depth test issue when using GL_LINE_STRIP.
Each line strip is drawn seperately, and I call GL_ENABLE(GL_DEPTH_TEST) before I draw each strip (don't ask!). I am using GL_LESS and have tried setting the near plane to a value other than zero. The depth buffer is not being cleared between each line strip, but I am still getting some line strips drawn in front of others that I know are behind - I am verifying this by using a fragment shader that colours according to the distance from a fixed point.
Any thoughts on what could be causing this? I'm on an nvidia 6800 with 175.19 drivers.
Your help much appreciated
EDIT: I tried disabling GL_DEPTH_TEST and get exactly the same result.