File: first.py

package info (click to toggle)
python-opengl 1.5.7-5.3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,192 kB
  • ctags: 3,971
  • sloc: ansic: 18,030; python: 8,909; tcl: 328; cpp: 211; makefile: 115; sh: 24
file content (13 lines) | stat: -rw-r--r-- 275 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python

from OpenGL.GL import *
from OpenGL.Tk import *

def redraw(o):
  glClearColor(0, 0, 1, 0)
  glClear(GL_COLOR_BUFFER_BIT)

o = Opengl(width = 200, height = 200, double = 1)
o.redraw = redraw
o.pack(side = 'top', expand = 1, fill = 'both')
o.mainloop()