Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


How to deal with Normals in opengl?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Gammastrahler   Members   -  Reputation: 150

Like
Likes
Like

Posted 18 June 2001 - 04:08 AM

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

Sponsor:

#2 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 18 June 2001 - 11:00 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS