Advertisement

Scaling killed my light!

Started by May 17, 2002 11:52 PM
5 comments, last by 23yrold3yrold 22 years, 9 months ago
I tried using glOrtho where there was once a gluPerspective. Kinda neat. But my little spinning octahedron was so far away! So I scaled it up (glScalef(60.0, 60.0, 60.0). But then I lost my lighting. My light''s position is thus: GLfloat LightPosition[]= { 2.0f, 2.0f, 2.0f, 0.0f }; glLightfv(GL_LIGHT0, GL_POSITION, LightPosition); so I don''t think the enlarged object engulfed my light. I can still see the object, but instead of nice sharply lit right side and darker left side, it''s all evenly darkened. Can someone give me an idea what''s wrong? Chris Barry (crbarry at mts.net) My Personal Programming Depot

Jesus saves ... the rest of you take 2d4 fire damage.

seems like you haven''t rescaled your normals
"Shadow of annoyance Ne''er come hither! ...And when He falleth, He falleth like Lucifer, Ne''er to ascend again..."
TOT
Advertisement
glEnable(GL_NORMALIZE);
All right
you should rescaled you normals
glEnable(GL_NORMALIZE)
Maybe you can try using glEnable(GL_RESCALE_NORMAL) instead of GL_NORMALIZE. It''s only in 1.2 and up though.

---
"No game will ever rule more than CBT!" - stoof
Visit Da Shovvkejs.
---Mikael Lax
Boy, you people sure know how to answer a guy''s question O_o Thanks; glEnable(GL_NORMALIZE) did it.

Chris Barry (crbarry at mts.net)
My Personal Programming Depot

Jesus saves ... the rest of you take 2d4 fire damage.

Advertisement
I''m sure if you had of used the search functionality of the board, you would have found the answer yourself.
Just a friendly reminder

This topic is closed to new replies.

Advertisement