OpenGL Super Bible! Page 355 The following code

OpenGL Super Bible! Page 355 The following code from the LITJET example program sets up a single light source to the upper-left behind the viewer. The light source is composed only of moderate ambient and diffuse components. // Light values and coordinates GLfloat whiteLight[] = { 0.5f, 0.5f, 0.5f, 1.0f }; GLfloat lightPos[] = { -50.f, 50.0f, -100.0f, 0.0f }; // Enable lighting glEnable(GL_LIGHTING); // Set up and enable light 0 glLightfv(GL_LIGHT0,GL_AMBIENT_AND_DIFFUSE,whiteLight); glLightfv(GL_LIGHT0,GL_POSITION,lightPos); glEnable(GL_LIGHT0); See Also glGetLight
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

Leave a Reply