   lighting + openGL state
  hii need to do lighting through pixel shaders. No problem this works.The problem is if i have an object on position 0,0,0 (a teapot for example) and the light is on 5,5,0, the object must be illuminated with a vector from 5,5,0 to 0,0,0. Now i move the teapot to 10,10,0. Now it must be illuminated from other side, but it is not, because when i use translation i translate the local coordinate system to 10,10,0 and then i apply the shader. But the light should have new coordinates -5,-5,0. I know that i have to calculate the vector from the teapot to the light to know where the light must be placed in the local coordinate system. I know how to do this - multiply the transformation matricies and then compute the location of point 0,0,0 and then i can compute that vector.So all i need to is apply some glTranslate, glRotate or glScale which will modify the modelview matrix. Then i should be able to calculate the 0,0,0 point from the modelview matrix. But i don't how to compute it. I have read the matrix as stated in openGL red book with glGetFloatv(GL_MODELVIEW_MATRIX, ...); and then with the values i computed the vector but it was wrong.Any idea, or some other approach? thanks in advaceXorMultiPleXus   