Hello…
I have scene in opengl ( a world , buldings and shadows which are casting from a fixed light source ““float lightPosition[] = {-5000, 5000, 1600, 0.0f};””). If i move my light source along x axis for example, the shadows follows this transformation and it starts moving in relation to the light source which is right and it seems nice. Now i want to rotate the light source around a fixed point ( like an orbit around my world) with glRotate I guess, but when i do this the shadows stays still, according the originall light source.
How can achieve this?
I also found something on internet which is might helpfull. The following comands but i dont know how to turn them into code. PLZ help i have along time trying to make this right…
Set the view transform
Push the matrix stack
Set the model transform to update the light’s position
Set the light position //glLightfv(GL_LIGHT_POSITION,…)
Pop the matrix stack
Send down the scene or model geometry
Swap buffers.