Advertisement Jump to content


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


one of my lights move when i glLoadIdentity();

This topic is 6515 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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.

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.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!