PDA

View Full Version : Delimiting same colour quads



endo
08-23-2002, 03:24 AM
How can I do borders around polygons without texturing them? I have a few quads next to each other but they are all the same colour, so want something to show where the edges are.

Bob
08-23-2002, 03:44 AM
You need to first draw your geometry in solid form. That is, as you are currently doing. Then draw it a second time, but with glPolygonMode(FRONT_AND_BACK, GL_LINE). This will draw the model in wire frame mode. You may have to use polygon offset to avoind some Z-fighting.

See the FAQ (http://www.opengl.org/developers/faqs/technical.html) , chapter 13, for polygon offset.

endo
08-23-2002, 08:01 AM
That faq sounds pretty complex but I'll give it a go, thanks.

endo
08-23-2002, 08:06 AM
While I'm here can someone clarify that the front of a quad is the clockwise wound side?

nexusone
08-23-2002, 10:24 AM
Would that not depend on how you draw the vertex?


Originally posted by endo:
While I'm here can someone clarify that the front of a quad is the clockwise wound side?

chowe6685
08-23-2002, 03:45 PM
I believe that opengl culling considers a counter clockwise wound polygon to be facing forward

endo
08-24-2002, 12:59 AM
This is my confusion because the SuperBible says that Quads and Quadstrips have clockwise winding? I would really like a definitive answer....