• Advertisement

Archived

This topic is now archived and is closed to further replies.

Problems with Normals

This topic is 6526 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hola! When I try to render a four verticie object using the GL_TRIANGLE_STRIP and try to GL_CULL_FACE it, it doens''t work. It will display half of the surface but not the other half. Also, how do you activate this *glNormal3f(-1.0f, 0.0f, 0.0f)*? I thought this was suppose to be used to tell the direction the face is pointing. But when I try to use it it doesn''t affect a thing. What''s going on here? ;( Justin Eslinger

Share this post


Link to post
Share on other sites
Advertisement
The normal that you specify with glNormal3f() is only used for lighting not culling. When OpenGL checks to see if a triangle is facing the camera it does this by looking at the order of the vertices. A clockwise order gets culled and a counter clockwise order is shown, or vice versa depending on your settings.

I think that you only see half of your surface because you send the vertices in the wrong order. Try using GL_TRIANGLE_FAN instead or send them in this order:


0 1
+-+
!/!
+-+
3 2


0 -> 1 -> 3 -> 2

Share this post


Link to post
Share on other sites

  • Advertisement