from OpenGL.GL import * class WireBox: def __init__(self, size): self.x0 = 0 self.x1 = size self.y0 = 0 self.y1 = size self.z0 = 0 self.z1 = size def setup(self): pass def update(self): pass def shutdown(self): pass def display_decoration(self, uniform): glUniform3fv(uniform['color'], 1, [0.6,0.6,0.6]) glBegin(GL_LINE_STRIP) glVertex(self.x0, self.y0, self.z0) glVertex(self.x0, self.y1, self.z0) glVertex(self.x0, self.y1, self.z1) glVertex(self.x0, self.y0, self.z1) glVertex(self.x0, self.y0, self.z0) glEnd() glBegin(GL_LINE_STRIP) glVertex(self.x1, self.y0, self.z0) glVertex(self.x1, self.y1, self.z0) glVertex(self.x1, self.y1, self.z1) glVertex(self.x1, self.y0, self.z1) glVertex(self.x1, self.y0, self.z0) glEnd() glBegin(GL_LINE_STRIP) glVertex(self.x0, self.y0, self.z1) glVertex(self.x1, self.y0, self.z1) glVertex(self.x1, self.y1, self.z1) glVertex(self.x0, self.y1, self.z1) glVertex(self.x0, self.y0, self.z1) glEnd() glBegin(GL_LINE_STRIP) glVertex(self.x0, self.y0, self.z0) glVertex(self.x1, self.y0, self.z0) glVertex(self.x1, self.y1, self.z0) glVertex(self.x0, self.y1, self.z0) glVertex(self.x0, self.y0, self.z0) glEnd() glBegin(GL_LINE_STRIP) glVertex(self.x0, self.y0, self.z0) glVertex(self.x1, self.y0, self.z0) glVertex(self.x1, self.y0, self.z1) glVertex(self.x0, self.y0, self.z1) glVertex(self.x0, self.y0, self.z0) glEnd() glBegin(GL_LINE_STRIP) glVertex(self.x0,self.y1,self.z0) glVertex(self.x1,self.y1,self.z0) glVertex(self.x1,self.y1,self.z1) glVertex(self.x0,self.y1,self.z1) glVertex(self.x0,self.y1,self.z0) glEnd() def display_window(self, uniform): pass