3 from OpenGL
.GL
import *
4 from OpenGL
.GLUT
import *
5 from OpenGL
.Tk
import *
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
,
13 glMaterialfv(GL_FRONT
, GL_SPECULAR
,
15 glMaterialf(GL_FRONT
, GL_SHININESS
, 80)
20 togl
= Opengl(width
= 250, height
= 250, double
= 1)
22 togl
.pack(side
= 'top', expand
= 1, fill
= 'both')
24 togl
.set_background(0, 0, 0)