marcus256
01-12-2004, 10:41 PM
My original problem is that I want to draw a 2D section of a 3D object (e.g. drawing a 2D section of a sphere would result in a circle).
The implementation that we currently have uses two coplanar clipping planes, separated by a very small distance. Since most polygons end up perpendicular to the view plane, they are often invisible if polygon mode is set to GL_FILL. On NVIDIA cards this is easily solved by setting polygon mode to GL_LINE, since the GL driver generates new vertices and hence nice visible lines that lie in the clipping planes.
On ATI cards, however, using polygon mode GL_LINE results in sparse line segements and points. The only conclusion I can make from this is that ATI performs clipping on a per pixel level, meaning that new vertices are not generated. Is this correct behaviour wrt the GL spec? Citing the OpenGL 1.5 spec, page 50:
Polygon
clipping may cause polygon edges to be clipped, but because polygon connectivity
must be maintained, these clipped edges are connected by new edges that lie along
the clip volume’s boundary.
I take it that "polygon" here means the primitive kind (point, line or polygon), and not the polygon mode (i.e. if we use polygon mode = GL_LINE, it's still a polygon, not a set of lines).
Is the ATI implementation wrong?
Are there any other solutions for my original problem?
[This message has been edited by marcus256 (edited 01-13-2004).]
The implementation that we currently have uses two coplanar clipping planes, separated by a very small distance. Since most polygons end up perpendicular to the view plane, they are often invisible if polygon mode is set to GL_FILL. On NVIDIA cards this is easily solved by setting polygon mode to GL_LINE, since the GL driver generates new vertices and hence nice visible lines that lie in the clipping planes.
On ATI cards, however, using polygon mode GL_LINE results in sparse line segements and points. The only conclusion I can make from this is that ATI performs clipping on a per pixel level, meaning that new vertices are not generated. Is this correct behaviour wrt the GL spec? Citing the OpenGL 1.5 spec, page 50:
Polygon
clipping may cause polygon edges to be clipped, but because polygon connectivity
must be maintained, these clipped edges are connected by new edges that lie along
the clip volume’s boundary.
I take it that "polygon" here means the primitive kind (point, line or polygon), and not the polygon mode (i.e. if we use polygon mode = GL_LINE, it's still a polygon, not a set of lines).
Is the ATI implementation wrong?
Are there any other solutions for my original problem?
[This message has been edited by marcus256 (edited 01-13-2004).]