Normals for GL_TRIANGLE_STRIP

Hi,
I am trying to implement lighting in a program. I have written a function which calculates a normal to a polygon given 2 vectors of the polygon. Now the program has a lot of triangles defined using GL_TRIANGLE_STRIP. Will I have to call the normal calculation function for each of the triangle (it is very tedious) or is there an intelligent method to overcome this ?

any ideas…
Milo

Unless your surface is defined by some sort of function and you can find it’s tangent at a point I think your out of luck. At least if your surface is static you only have to compute the normals once, but I’m guessing yours is not

You will have to compute every normal for every polygon you draw unless if you have pre-computed them and saved them… I dont know what kind of drawing you are doing, but it is generally simple. Normals are independent of how many calls to glBegin( POLY_TYPE ) you make.

Good luck

Miguel Castillo

Originally posted by Milo:
[b]Hi,
I am trying to implement lighting in a program. I have written a function which calculates a normal to a polygon given 2 vectors of the polygon. Now the program has a lot of triangles defined using GL_TRIANGLE_STRIP. Will I have to call the normal calculation function for each of the triangle (it is very tedious) or is there an intelligent method to overcome this ?

any ideas…
Milo [/b]

[This message has been edited by mancha (edited 02-20-2003).]