🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
can opengl automaticly work out Normals?
ive been lookin at me prog wondering if opengl can create the normals for vextors. i know theres a AUTO_NORMAL glbegin routine and normalise. how do i use them?
~prevail by daring to fail~
There is functionalty for doing automatic normals... but 99 times out of a 100 it will give you some realy funky results....
To say that it''s unpredictable is an understatement.
==============================
"What if Bill Gates hade a penny everytime windows crashed?
Oh wait, he does!"
-Dont know who said that, but it's funny :)
-Joacim Jacobsson
To say that it''s unpredictable is an understatement.
==============================
"What if Bill Gates hade a penny everytime windows crashed?
Oh wait, he does!"
-Dont know who said that, but it's funny :)
-Joacim Jacobsson
Actually, I haven''t had problems with it giving me funky results, it just does per-vertex normals (not per-polygon) so you don''t get distinct edges on objects (which makes things look odd). Just for reference, the function is glEnable( GL_NORMALIZE ).
Morgan
Morgan
Morgan, that only makes opengl recalculate any normals you supply that are not unit vectors to unit vectors (ie. their length is 1). It does not generate automatic normals. It also slow''s down openGl performance a bit, so you should avoid using it...
==============================
"What if Bill Gates hade a penny everytime windows crashed?
Oh wait, he does!"
-Dont know who said that, but it's funny :)
-Joacim Jacobsson
==============================
"What if Bill Gates hade a penny everytime windows crashed?
Oh wait, he does!"
-Dont know who said that, but it's funny :)
-Joacim Jacobsson
i thought that glEnable(GL_NORMALIZE); was the normalize the normals to unit vectors. and glEnable(GL_AUTO_NORMAL); was to automatically setup normals. i think that''s it.
i thought that glEnable(GL_NORMALIZE); was the normalize the normals to unit vectors. <--- that was what I was trying to say ![](smile.gif)
Dont know about the GL_AUTO_NORMALS, i think you are right on that one but I cant find anything in the red book on the subject...
==============================
"What if Bill Gates hade a penny everytime windows crashed?
Oh wait, he does!"
-Dont know who said that, but it's funny :)
-Joacim Jacobsson
![](smile.gif)
Dont know about the GL_AUTO_NORMALS, i think you are right on that one but I cant find anything in the red book on the subject...
==============================
"What if Bill Gates hade a penny everytime windows crashed?
Oh wait, he does!"
-Dont know who said that, but it's funny :)
-Joacim Jacobsson
Ah, yeah, GL_AUTO_NORMAL must have been what I was thinking of, and no I don''t actually use it (I calculate them on the fly when I first load my models). If you want a good source for learning to calculate normals for polygons then check out Nate''s site (nate.scuzzy.net).
Morgan
Morgan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement