Skip to main content
GameDev.net gamedev.net
🔒 Locked

PolygonOffset Problems :( !

Started by SirTwist Feb 24, 2005 at 8:54 AM 2 replies 500+ views
Original Post
SirTwist
SirTwist
Hi all, I got a problem with the PolygonOffset mode from OGL. I have a sphere made of a triangle mesh. Now I draw each triangle in FILLED and colored. But I also want to show the actual mesh and therefor draw the triangles again, only the second time in LINE mode. To visualize the outlines correctly I have to use the polygon offset mode and it generally works. BUT some of the outlines still seem to be drawn behind the triangle faces, depending on the angle from which you look at the sphere. No at the moment I draw the filled triangles with the offset mode first and the triangle outlines without offset second. I tried to draw the filled triangles first WITHOUT offset and after that the outlines WITH offset. For some reason the result looked like crap. My trouble with those lines that disappear behind the filled triangles doesn´t improve when I change the parameters of glPolygonOffset( ... ). So at the moment I use (1.0, 1.0). Can anybody explain what´s going wrong here ? And maybe how I might fix it ? Thanks a lot ... Twist
SirTwist
SirTwist
Well, I tried that, of course. But it doesn´t change a thing. Apart from the first parameter seeming to create kind of a 'shadow' around the sphere if I push it too high, that is.

Here´s a picture of what I mean. Inside the red ellipse you can see where polygon offset doesn´t work :(.



Twist

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.