View Full Version : how to draw a polygon with different border color

07-27-2003, 05:05 AM
I want to draw a polygon in two ways

1 http://www.opengl.org/discussion_boards/ubb/redface.gifnly border with transparent inside
2:solid inside and border with different colors.
is that possible?
thanks for help

07-27-2003, 05:09 AM
Yes, you can do it in two quick passes by drawing the interior first with glPolygonMode(GL_FRONT, GL_FILL) then switching to glPolygonMode(GL_FRONT, GL_LINE) and changing your color before drawing it again.

If you're using the depth test, you might have to use an offset for the second pass. Also, replace GL_FRONT with whatever face(s) you want to draw.

07-27-2003, 02:28 PM
Thanks for reply
What do you mean by a "quick pass" and
"use an offset for the second pass".
since I m a beginner you know http://www.opengl.org/discussion_boards/ubb/smile.gif