one of my lights move when i glLoadIdentity();
ive just added a little function to draw a quad onto the very front of my screen (z of -0.1) but in that function, when glLoadIdentity(); before i translate, my GL_LIGHT_2 moves, for some reason...
i have a render() function, which moves my 2nd light (which, is kinda the same as keeping it in one place, the opposite to my camera) the first light stays exactly in the same place, (but doesnt get moved normally)
then it draws all my faces, then the sprites, then the HUD quads, but if it does draw my hud things, it affects the light on my faces, until i stop drawing the hud
if i disable my other light, it doesnt make any difference
i have absolutley no ieda *why* this is happening :// help!
can i store the current "identity" or anything? this might help i guess (just wanna try anything)
__________________
graham "red" reeves.
red@deadpenguin.org
www.deadpenguin.org
__________________graham "red" reeves.[email=red@deadpenguin.org]red@deadpenguin.org[/email]www.deadpenguin.org
you sure you have an identity when you call glLightfv() to set the position?
i think so...
i call the loadidentity() about loads of times before i draw the hud anyways, i do it everytime i draw a face, but, this moves the light to another positon (the wrong one) *only* when i call my function that draws a quad for the HUD.
if i comment out glloadidentity in the HUD-quad-drwing func, its fine, (but the posiiton on the quad is wrong)
the source code is availbile to anyone who thinks they can really help me, as theres a bit much to quote, (too many funcs
__________________
graham "red" reeves.
red@deadpenguin.org
www.deadpenguin.org
i call the loadidentity() about loads of times before i draw the hud anyways, i do it everytime i draw a face, but, this moves the light to another positon (the wrong one) *only* when i call my function that draws a quad for the HUD.
if i comment out glloadidentity in the HUD-quad-drwing func, its fine, (but the posiiton on the quad is wrong)
the source code is availbile to anyone who thinks they can really help me, as theres a bit much to quote, (too many funcs
![](wink.gif)
__________________
graham "red" reeves.
red@deadpenguin.org
www.deadpenguin.org
__________________graham "red" reeves.[email=red@deadpenguin.org]red@deadpenguin.org[/email]www.deadpenguin.org
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement