Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def makeLighting():
- glEnable(GL_LIGHTING)
- glEnable(GL_LIGHT0)
- glLightfv(GL_LIGHT0, GL_POSITION, (0, 0, 0, 0))
- glLightfv(GL_LIGHT0, GL_AMBIENT | GL_DIFFUSE | GL_SPECULAR, (0, 0, 0, 1))
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT, (0.5, 0.5, 0.5, 1))
- # glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, (1, 0, 0, 1)) ###рассеянный свет
- # #glMaterialfv(GL_FRONT, GL_DIFFUSE, (1, 0, 0, 1)) ###другой рассеянный свет
- # glMaterialfv(GL_FRONT, GL_SPECULAR, (0.1, 0.1, 0.1, 1)) ###отражаемый свет
- # glMaterialfv(GL_FRONT, GL_EMISSION, (0.1, 0, 0, 1)) ###излучаемый свет
- # glMaterialfv(GL_FRONT, GL_SHININESS, 128) #степень блеска
- glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, torus.glPnames.get(GL_AMBIENT_AND_DIFFUSE)) ###рассеянный свет
- glMaterialfv(GL_FRONT, GL_SPECULAR, torus.glPnames.get(GL_SPECULAR)) ###отражаемый свет
- glMaterialfv(GL_FRONT, GL_EMISSION, torus.glPnames.get(GL_EMISSION)) ###излучаемый свет
- glMaterialfv(GL_FRONT, GL_SHININESS, torus.glPnames.get(GL_SHININESS)) #степень блеска
Add Comment
Please, Sign In to add comment