PDA

View Full Version : Polygon offset on light points



Vinnie
05-15-2002, 06:22 AM
Does anyone know how to applie the equivalent of a polygon offset on a light point? I know enabling GL_POLYGON_OFFSET_POINT will apply an offset to the polygons drawn in point mode, but it doesn't seem that it will on points drawn within glBegin(GL_POINTS). Any ideas? Thanks.

MikeM
05-15-2002, 06:43 AM
I typically use PolygonOffset to eliminate Z-fighting or 'stitching' on coplanar polygons. You may be able to achieve the same effect by disabling Depth checking before you draw your points.

Of course, this will also disable updates to the depth buffer as well, so it may have some unwanted side effects.

Another thing you might try is instead of doing a glBegin(GL_POINTS), do a glBegin(GL_POLYGONS) and draw all your points as polygons, but in point mode. Even if your points are not planar, the renderer should handle them fine since they are only being rendered as points.

Food for thought. Good luck.

-Mike