A little bit of nothing.
[krufty_fps.git] / togl.py
blob52667011644a19e745abd26e461f18672fcfabcf
1 #!/usr/bin/python
3 from OpenGL.GL import *
4 from OpenGL.GLUT import *
5 from OpenGL.Tk import *
7 def display(togl):
8 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
9 glMaterialfv(GL_FRONT, GL_AMBIENT,
10 [0.1745, 0.0, 0.1, 0.0])
11 glMaterialfv(GL_FRONT, GL_DIFFUSE,
12 [0.1, 0.0, 0.6, 0.0])
13 glMaterialfv(GL_FRONT, GL_SPECULAR,
14 [0.7, 0.6, 0.8, 0.0])
15 glMaterialf(GL_FRONT, GL_SHININESS, 80)
16 glutSolidTeapot(1.5)
17 glFlush()
19 glutInit([])
20 togl = Opengl(width = 250, height = 250, double = 1)
21 togl.redraw = display
22 togl.pack(side = 'top', expand = 1, fill = 'both')
23 togl.basic_lighting()
24 togl.set_background(0, 0, 0)
25 togl.mainloop()