example - in python)
{
//...
mat_specular = [ 1.0, 0.5, 1.0, 1.0 ] mat_shininess = [ 50.0 ] light_ambient = [ 0.0, 0.0, 0.0, 1.0 ] light_diffuse = [ 1.0, 1.0, 1.0, 1.0 ] light_specular = [ 1.0, 1.0, 1.0, 1.0 ] light_position = [ 1.0, 1.0, 1.0, 0.0 ] glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient) glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse) glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular) glLightfv(GL_LIGHT0, GL_POSITION, light_position) glEnable(GL_LIGHTING) glEnable(GL_LIGHT0) glEnable(GL_DEPTH_TEST) # With this line, the cube is weird lines that change when you move. Without this line the cube is partially transparent.
}