
import glitch, glitch.glut

import OpenGL.GL as gl

class Square(glitch.Node):
    def draw(self, ctx):
        gl.glColor3f(0, 1.0, 0)
        gl.glBegin(gl.GL_QUADS)
        gl.glVertex3f(0, 0, 0)
        gl.glVertex3f(1, 0, 0)
        gl.glVertex3f(1, 1, 0)
        gl.glVertex3f(0, 1, 0)
        gl.glEnd()

square = Square()
camera = glitch.glut.GLUTCamera(children=[square])

camera.run()
