How to deal with Normals in opengl?

Started by
0 comments, last by Gammastrahler 22 years, 10 months ago
I have a problem.... i create my geometry from scratch before entering the render task, for example: (-5, 0, 5) (5, 0, 5) (5, 0, -5) (-5, 0, -5) define a plane perpendicular to the y-axis, so the unit normal is 1. this normal is precalculated before entering the main loop. when i move and rotate through the world, i use glRotate and glTranslate and then pass the calculated normal (which remains the same as well as the vertex of the plane). but if i take a dot product on any polys vertex and normal, for example, to test backface culling, it does not work correctly. do i have to rotate the corresponding poly and normal coords as well by the current angles? thankful, gammastrahler
Advertisement
no , normals vertices stay the same.
sorry i cant give example code on how to do it (im on the internet doh)

http://members.xoom.com/myBollux

This topic is closed to new replies.

Advertisement