PDA

View Full Version : Clipping planes differs on Nvidia and ATI



johanh
08-25-2005, 11:00 PM
I want to render the outline of a polygon that intersects a plane, and my implementation is using two parallell clipping planes very close to my intersection plane and render the polygon in GL_LINE mode.
This works just fine on my NVidia graphics card but some of my collegues has ATI cards and they can only see fragments of the lines.

I have written a test program to illustrate my problem using NeHe's tutorial. I have just added a clip plane and render in GL_LINE mode.

https://support.ati.com/ics/tt/getFile.asp?ticketID=822919&file=Clip%20plane%20problem.jpg&hash=DB83BAAC7C1C61C3710349A87D16931B

My problem seems to be the same as another topic (http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=011300) in this forum, but I really need to render the edges of the clipped polygon so I guess I cannot use the zBuffer solution suggested there...

Do anyone have any suggestions on how to make the two chipset render like the NVidia one.
I have thought about using the Vertex Shader but I guess that won't be plausable because the Vertex Shader uses a per vertex approach...

Jens Scheddin
08-26-2005, 03:24 AM
ATI is simply not connecting the clipped lines as nVidia does. I don't know if nVidia's or ATI's way is conformant to the OpenGL spec but it looks like you need to do the clipping yourself on the CPU.

johanh
08-26-2005, 04:32 AM
Originally posted by marcus256:
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.So doesn't ATI's implementation conform to the OpenGL specs?

Jens Scheddin
08-26-2005, 05:11 AM
Originally posted by johanh:

Originally posted by marcus256:
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.So doesn't ATI's implementation conform to the OpenGL specs?Yeah, looks like it doesn't. You could write them a mail about this but it would take months until they fix it (if they ever fix it). I remember something similar when rendering in wireframe mode some time ago (~2 years)...