I can't get lighting to work

Started by
14 comments, last by IndrekSnt 20 years, 6 months ago
Just use GL_LIGHT2, GL_LIGHT3...
Sometimes movement is a result of a kick in the ass!
Advertisement
How do is use it in here:
#define LIGHTS 100
for(int i=0;iglEnable(i);
}

Do i have to use enums somehow here then how to?

Eyes - fountains running blood...

...That''''s me
Eyes - fountains running blood......That''s me
The maximum amount of lights you can get in OpenGL 1.1 is 8. So
if you will #define LIGHTS 100 it won''t help you.
Sometimes movement is a result of a kick in the ass!
Yes but i''m sure i''m not drawing over 8 lights at the time. This is too confusing for me, got to check some tutorials for portals i think...

Eyes - fountains running blood...

...That''''s me
Eyes - fountains running blood......That''s me
Also, you need to use the offset from GL_LIGHT0 when you enable your lights. So, instead of:

glEnable(i)

use:

glEnable(GL_LIGHT0+i)
"When you die, if you get a choice between going to regular heaven or pie heaven, choose pie heaven. It might be a trick, but if it's not, mmmmmmm, boy."
How to Ask Questions the Smart Way.
Thank You! Thank You!

Eyes - fountains running blood...

...That''''s me
Eyes - fountains running blood......That''s me

This topic is closed to new replies.

Advertisement