PDA

View Full Version : GL_POINT, GL_LINE_STRIP



devdept
12-31-2007, 10:03 AM
Hi All,


Why if I draw 5 black points with glPointSize(4) and 4 white lines to connect these points I always see the lines in front of points? Is there a way to render before lines than points?

Thanks a lot & happy 2008!


Alberto

zeoverlord
12-31-2007, 03:27 PM
Draw lines first, then points.
If that doesn't work use glPolygonOffset.

look up how to use it here (http://www.opengl.org/sdk/docs/man/).

Dark Photon
12-31-2007, 08:01 PM
Alternatively, if nothing should ever occlude the points, just glDisable( GL_DEPTH_TEST ) (and draw the points last, as zeoverlord suggested).

devdept
01-02-2008, 03:22 AM
glDisable(GL_DEPTH_TEST) worked. Thanks!

Alberto