View Full Version : Fill & Wireframe in the same time

03-16-2002, 04:10 PM
I'm using OpenGL+Delphi and I want to draw an filled object but in the same time to draw its wireframe structure over. The problem is that if I do something like this:

scale the Object; // Add a small offset

some of the wire triangles are not visibile

I understand that i should use Polygon Offset but I dont know how.(some sample code pretty much expected)

Do i have to take into account the geometry for computing the Offset values?

I deal with CONCAVE objects so drawing solid+setting depth testing off+drawing wire will not do the trick>


03-16-2002, 04:27 PM
as u said use polygon offset
v easy to use (seacrch google or see redbook for exact syntax)

draw solid model
enable polygon offset of perhaps (1,1)
draw wire model

03-17-2002, 12:24 AM
There's a good explanation of PolygonOffset in the FAQ (http://www.opengl.org/developers/faqs/technical/polygonoffset.htm) . Read through all of it while you're at it, it contains lots of things that are worth knowing.