Jump to content
• Advertisement

#### Archived

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

# normals for GL_TRIANGLE_STRIP

This topic is 5451 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

I know how to do normals for quads and triangles, but what about triangle strips? especially when the two triangles that follow each other aren''t located in the same plane?

#### Share this post

##### Share on other sites
Advertisement
the order of vertices supplied for a triangle strip...as you should know is
tri 1 : v0 v1 v2
tri 2 : v2 v1 v3
know for each triangle get the crossproduct of 2 vectors and probably normalize the result, there you have the normals you''re looking for
If you need per vertex normals just average the normals for the faces that are sharing the vertex.

#### Share this post

##### Share on other sites
my question is: where to place glNormal3f calls?

glBegin(GL_TRIANGLE_STRIP);

//Normal for first triangle
glVertex3f(*, *, *); //vertex 0

glVertex3f(*, *, *); //vertex 1

glVertex3f(*, *, *); //vertex 2
//should I add glNormal3f call for the second triangle here?
glVertex3f(*, *, *); //vertex 3

glEnd();

thx

Another question:
glEnable(GL_NORMALIZE) makes OpenGL automatically calculate normals , right?

#### Share this post

##### Share on other sites
First part yes second part no.. GL_NORMALIZE normalizes normals passed to glNormal3f I believe.. (making them unit vectors)

[edited by - uber_n00b on August 16, 2003 5:49:28 PM]

#### Share this post

##### Share on other sites
quote:
Original post by uber_n00b
First part yes second part no.. GL_NORMALIZE normalizes normals passed to glNormal3f I believe.. (making them unit vectors)

[edited by - uber_n00b on August 16, 2003 5:49:28 PM]

ok thx

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
Rutin
24
2. 2
3. 3
4. 4
JoeJ
18
5. 5
• Advertisement

• 14
• 14
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631757
• Total Posts
3002142
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!