hello,
i´m perfoming a multipass render into fbo, and i have 2 objects a cube and a sphere, the problem is that when i rotate the camera , the cube stays in it´s place but the sphere follows me , and the cube doesn´t , why is this happening ? the sphere should stay in it´s place, like th ecube does i´m using my own matrix stacks and there is no other transformation applied besides the light´s translation, this is what i´m doing :
Bind Render
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glLoadMatrixf(projMATRIX);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glLoadMatrixf(modelView);
Cube();
glTranslatef(pos,pos,pos);
DrawSphere()
Unbind Render
any ideas?!
Thanks