PDA

View Full Version : diagonals on line-drawn polygons



dimroed
01-03-2003, 09:38 AM
If I draw quads on the screen using lines instead of fills, by doing:

[CODE]
glPolygonMode(GL_FRONT,GL_LINE);
glPolygonMode(GL_BACK,GL_LINE);
[CODE]
beforer drawing the polygons, diagonals for each quad are also drawn if the quad is near the edge of the screen. Why does this happen and how can I fix it?

Thanks,
-dimroed

baloneyman
01-04-2003, 09:55 PM
Not sure but try glDisable(GL_SMOOTH)...

Omaha
01-05-2003, 02:57 PM
I would venture a guess that your implementation clips things that lie partially on and offscreen by decomposing them into triangles.

dimroed
01-05-2003, 03:55 PM
Thanks... I tried to use glDisable(GL_SMOOTH), but it didn't seem to fix the problem. My base code is the same as the NeHe code from this website (http://nehe.gamedev.net/tutorials/lesson.asp?l=01) .

Any other ideas about how to disable this clipping?

baloneyman
01-05-2003, 05:39 PM
What grafix card are you using?

I've seen 'near clip' problems on SiS
grafix chips.

I've also seen it on other boards but
it was usually solved by not using the
glShadeModel(GL_SMOOTH).

NeHe's base code was usually the same
from the 2d lesson thru the 3d textured
lessons. Do you mean your base code is
from lesson 1 or from another lesson?

dimroed
01-05-2003, 06:42 PM
Yeah, I'm using a SIS card. That must be it. Thanks!

I am using NeHe's code from those first few lessons.