Super-K

02-04-2002, 09:24 AM

For example. I have an object that is scaled {-1,0,0}. Mirrored on the x axis, basically.

The gl code would kinda look like:

glScale(-1,0,0)

glNormal3fv(x,y,z)

draw_face()

glNormal3fv(x,y,z)

draw_face()

...

(x,y,z) is the computed normal of the untranslated face.

Of course, this doesn't work because all the normals are still reversed. Does the gl system not apply the current matrix to the glNormal call? Or maybe I just don't know what I'm doing (more likely).

I'm going to need to handle gluTessNormal stuff too, I'm wondering if it does or does not translate the normals by the current matrix.

I guess my question boils down to: Should I be calculating the normal based on the translated or untranslated version of the face?

Thanks for any info!

The gl code would kinda look like:

glScale(-1,0,0)

glNormal3fv(x,y,z)

draw_face()

glNormal3fv(x,y,z)

draw_face()

...

(x,y,z) is the computed normal of the untranslated face.

Of course, this doesn't work because all the normals are still reversed. Does the gl system not apply the current matrix to the glNormal call? Or maybe I just don't know what I'm doing (more likely).

I'm going to need to handle gluTessNormal stuff too, I'm wondering if it does or does not translate the normals by the current matrix.

I guess my question boils down to: Should I be calculating the normal based on the translated or untranslated version of the face?

Thanks for any info!