help: lesson 37
Hi,
I'd like to have some explanation about the code for outline drawing in lesson 37.
The glCullFace (GL_FRONT) allows to draw only the backfacing polygons, so the code for drawing the faces
will draw all the backfacing using GL_TRIANGLES. So why
is necessary to have the command glPolygonMode (GL_BACK, GL_LINE) ?
If I remove glPolygonMode (GL_BACK, GL_LINE) from the code, the outline is not drawn. It's not clear for me why, I think I didn't understand what this function actually does.
Thanks in advance,
Angel.
[edited by - Angela on January 20, 2003 9:30:42 AM]
if you remove that line the polygons will be drawn but since they face the wrong way the will not be visible.
glPolygonMode (GL_BACK, GL_LINE) draws the triangles as lines instead of being filled(note: a line can be seen from all angles and thus can''t be culled)
glPolygonMode (GL_BACK, GL_FILL) sets it back to normal.
It''s allso using the fact that lines must have a width that can be set to whatever value you like, polygons are hard to manipulate in that way.
glPolygonMode (GL_BACK, GL_LINE) draws the triangles as lines instead of being filled(note: a line can be seen from all angles and thus can''t be culled)
glPolygonMode (GL_BACK, GL_FILL) sets it back to normal.
It''s allso using the fact that lines must have a width that can be set to whatever value you like, polygons are hard to manipulate in that way.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
>if you remove that line the polygons will be drawn but since >they face
>the wrong way the will not be visible.
Why not? The glCull doesn''t set to be culled the frontfacing, instead
of the backfacing?
>glPolygonMode (GL_BACK, GL_LINE) draws the triangles as lines
>instead of being filled(note: a line can be seen from all >angles
>and thus can''t be culled)
I think I didn''t understand what the glCull does.
Could you explain me?
I thought that to cull a face meant not to draw a face.
>glPolygonMode (GL_BACK, GL_FILL) sets it back to normal.
ok.
Thanks
, Angela
>the wrong way the will not be visible.
Why not? The glCull doesn''t set to be culled the frontfacing, instead
of the backfacing?
>glPolygonMode (GL_BACK, GL_LINE) draws the triangles as lines
>instead of being filled(note: a line can be seen from all >angles
>and thus can''t be culled)
I think I didn''t understand what the glCull does.
Could you explain me?
I thought that to cull a face meant not to draw a face.
>glPolygonMode (GL_BACK, GL_FILL) sets it back to normal.
ok.
Thanks

This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement