Jason Ward wrote:
Hi I am having trouble with Lighting in pyopengl.
whenever I use
glEnable(GL_LIGHTING)
My objects look blue, my light color is (1,1,1,1)
Therefore my object should be its own color.
which is red,blue, and green. It is a triangle with each side a different color.
I am using Pygame to handle events and the Window. Glut was too slow and only allowed one keypress at a time. Pygame works much better for PyOPENGL.
If I turn off the Lighting then My colors are fine but I don't have any lighting :(
My light is set up properly.
It seems to make a difference where I put my glEnable(GL_LIGHTING)
If my drawing code is not in a loop and I put
glEnable(GL_LIGHTING)
just above this
pygame.display.flip()
then it works fine. But if I put my program/drawing code in a loop then My lighting just makes my object appear blue.
Alex.