Archived

This topic is now archived and is closed to further replies.

albert_fish

lighting without normals?

Recommended Posts

Does anyone know how it''s possible to be able to use lighting in OpenGL without any defined normals? I have a program in which I put a spot on a sphere, drawn with the glutSolidSphere command. I define the spot and let it shine on the sphere. And it works perfectly, without any defined normal. I thought you always have to use normals in order to use lighting. Thanks. Tatum

Share this post


Link to post
Share on other sites
I''ve never used the glutSolidSphere(), but I guess glut defines the normals for opengl automatically if lighting is enabled.

Visit our homepage: www.rarebyte.de.st

GA

Share this post


Link to post
Share on other sites
You can enable GL_AUTO_NORMALS (or something like that) to have OpenGL generate the normals of triangle, quads, and polygons for you so that you don''t have to define them.

Morgan

Share this post


Link to post
Share on other sites
its better to fugure out normals for ure self as doig it on the fly and letting OGL do them will slow down ure program and may not even give u the desirred effect

~prevail by daring to fail~

Share this post


Link to post
Share on other sites
I agree, if you want to learn how to calculate your own normals, check out Nate''s tutorial on normals and stuff, you can find it at nate.scuzzy.net.

Morgan

Share this post


Link to post
Share on other sites