glPointSize and clipping volume

When I use glPointSize it seems to invalidate the clipping volume. I use the glPointSize in a function that displays my scene correctly prior to the function but after, the clipping within the viewport is no longer working. Can someone help?

	virtual void DrawVertex()
	     glVertex2f(p1.x, p1.y);
	     glVertex2f(p2.x, p2.y);
	     glVertex2f(p3.x, p3.y);

Technically you should glScissor to guarantee fragments remain within the viewport. Points with size are an interesting issue in the spec due to center clipping not fragment level clipping and the obvious issues this causes.

But clipping should not break (it may be a side effect of the clip path for points being fudged to handle size elegantly).

You may incur a significant performance penalty falling off the clip path, so this sounds potentially nasty.

If it’s just points then this is normal and correct behavior and you should use glScissor in addition to glViewport.

You don’t provide a lot of info … :-/

Out of curiosity, if points are clipped according to their centre, the how does the glScissoring help? If the points are clipped, there will be no fragments at all? Or did I misunderstand the whole point? (hehe)

Use a larger viewport, and glScissor to cut precisely where you want.
EDIT: because scissor works on individual pixels.

Perhaps an alternative workaround would be to draw view aligned GL_QUADS instead of GL_POINTS, or use point sprites (though I’m not sure how those are clipped).

I’m not trying to clip the points I’m trying to maintain the viewport that I’ve defined prior to rendering and which appears to be invalidated by using glPointSize.

I’m using glOrtho to define my viewing volume…

	glOrtho( xMin, xMax, yMin, yMax, -1, 1);
	glMatrixMode( GL_MODELVIEW );

I can call all my drawing functions and the viewing volume remains. However when I call my function that contains the glPointSize my viewing volume changes beyond the limits I have defined.
If I comment out glPointSize, the viewing volume is maintained.

Is this normal behavior of glPointSize?

Look at Common OpenGL Pitfalls pitfall number 10

Look at Common OpenGL Pitfalls pitfall number 10
Thanks. That explains it.