Ledivin
12-04-2010, 01:24 PM
How can I go about this? I've done lots of reading, and I just can't find anything regarding it... I'm sure it's just something simple, but it's a surprisingly hard subject to search for.
Thanks in advance!
EDIT: I guess it's important to say I'm using PyOpenGL, though it shouldn't make a large difference.
I've also been having some trouble regarding multiple lights, eg:
glEnable(GL_LIGHT0)
glLight(GL_LIGHT0, GL_POSITION, (0, 1, 1, 0))
glEnable(GL_LIGHT1)
glLight(GL_LIGHT1, GL_POSITION, (0, 1, 1, 0))
glLightfv(GL_LIGHT0, GL_POSITION, (0, 1.5, 1, 0))
glLightfv(GL_LIGHT1, GL_POSITION, (0, 1.5, 1, 0))
As you can see, the code is EXACTLY the same, but with only GL_LIGHT1 and the GL_LIGHT0 blocks commented out, no light appears. Is it necessary to enable 0 before 1 is accessible?
Thanks in advance!
EDIT: I guess it's important to say I'm using PyOpenGL, though it shouldn't make a large difference.
I've also been having some trouble regarding multiple lights, eg:
glEnable(GL_LIGHT0)
glLight(GL_LIGHT0, GL_POSITION, (0, 1, 1, 0))
glEnable(GL_LIGHT1)
glLight(GL_LIGHT1, GL_POSITION, (0, 1, 1, 0))
glLightfv(GL_LIGHT0, GL_POSITION, (0, 1.5, 1, 0))
glLightfv(GL_LIGHT1, GL_POSITION, (0, 1.5, 1, 0))
As you can see, the code is EXACTLY the same, but with only GL_LIGHT1 and the GL_LIGHT0 blocks commented out, no light appears. Is it necessary to enable 0 before 1 is accessible?