# The Industry's Foundation for High Performance Graphics

1. ## Normals and GL_TRIANGLE_STRIP

I know how to calculate a normal for polygons. Like if I did glBegin( GL_TRIANGLES ) I would do a glNormal followed by 3 glVertex calls and you repeat this process for each triangle. But I need to draw my triangles as strips so how do I calculate the normals for this since when I add a 4th and each additional pixel after that, I would need a new normal to be calculated? Is this possible? If my question does not make sense, please tell me what confuses you so I can clear up the confusion. Thanks for your help!

2. ## Re: Normals and GL_TRIANGLE_STRIP

If you want per face normals you can't use a triangle strip, you'll have to use GL_TRIANGLES.

3. ## Re: Normals and GL_TRIANGLE_STRIP

I want normals for lighting and shading. I was reading through some examples in the Superbible and it talked about using normals on a per/polygon basis. Can I do lighting and shading with a normal per/vertex basis? I am plan to do more reading tonight on lighting and shading but any more help would be great. Thanks!

4. ## Re: Normals and GL_TRIANGLE_STRIP

You can perform lighting on a per-vertex basis. The normals will be interpolated across the polygon if smooth shading is enabled. Flat shading will eliminate the normal interpolation.

5. ## Re: Normals and GL_TRIANGLE_STRIP

So I need to just calculate the normals at the vertices then? And everytime I do a glVertex, right before it do a glNormal? Thanks again!

6. ## Re: Normals and GL_TRIANGLE_STRIP

Originally posted by jtipton:
You can perform lighting on a per-vertex basis. The normals will be interpolated across the polygon if smooth shading is enabled. Flat shading will eliminate the normal interpolation.
Normals won't be interpolated across the polygon, only the resulting color, which will be computed per vertex(Normal dot ligtvector). What you mean is per pixel lighting, for this kind of lighting, shaders or some extensions are needed.

7. ## Re: Normals and GL_TRIANGLE_STRIP

Or you can use 3 times the same normal for each vertex of a polygon.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•