Advertisement
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_AMBIENT | GL_DIFFUSE | GL_SPECULAR, (0, 0, 0, 1))
- #glLightfv(GL_LIGHT0, GL_POSITION, (0, 0, 0, 0))
- #glLightfv(GL_LIGHT0, GL_AMBIENT, (0, 0, 0, 1))
- #glLightfv(GL_LIGHT0, GL_DIFFUSE, (0, 0, 0, 1))
- #glLightfv(GL_LIGHT0, GL_SPECULAR, (0, 0, 0, 1))
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT, torus.GL_Pnames_dict.get(GL_LIGHT_MODEL_AMBIENT))
- glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, torus.GL_Pnames_dict.get(GL_LIGHT_MODEL_LOCAL_VIEWER))
- glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, torus.GL_Pnames_dict.get(GL_LIGHT_MODEL_TWO_SIDE))
- glMaterialfv(GL_FRONT, GL_AMBIENT_AND_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) # степень блеска
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement