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?
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.
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)
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 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.