Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

How to deal with Normals in opengl?

4: Adsense

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   

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

#2 zedzeek   Members   

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.