Archived

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

redmonkey

one of my lights move when i glLoadIdentity();

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites