def appInit(self): """ Create the scene and intitialize the shapes to be put in the scene """ self.shapes = [] # set viewing projection glClearColor(1.0, 1.0, 1.0, 0.0) glColor(0.0, 0.0, 0.0) glMatrixMode(GL_PROJECTION) glLoadIdentity() gluOrtho2D(0.0, WINDOW_WIDTH, 0.0, WINDOW_HEIGHT) tri = Triangle() tri.set_location(10, 50) tri.set_color(0, 1, 1) self.shapes.append(tri) tri = Triangle() tri.set_location(70, 50) tri.set_color(1, 0, 1) tri.set_size(2, 2) self.shapes.append(tri) tri = Triangle() tri.set_location(300, 50) self.shapes.append(tri)
def appInit(self): """ Setup the scene and add the shapes to it """ glClearColor(1.0, 1.0, 1.0, 1.0) glColor(0.0, 0.0, 0.0) glPointSize(4.0) glMatrixMode(GL_PROJECTION) glLoadIdentity() gluOrtho2D(0.0, WINDOW_WIDTH, 0.0, WINDOW_HEIGHT) self.scene = Scene() tri = Triangle() tri.set_location(10, 50) tri.set_color(0, 1, 1) self.scene.addShape(tri) tri = Triangle() tri.set_location(70, 50) tri.set_color(1, 0, 1) tri.set_size(2, 2) self.scene.addShape(tri) tri = Triangle() tri.set_location(300, 50) self.scene.addShape(tri)
def appInit(self): """ Setup the scene and add the shapes to it """ self.shapes = [] glClearColor(1.0, 1.0, 1.0, 1.0) glColor(0.0, 0.0, 0.0) # glPointSize(4.0) glMatrixMode(GL_PROJECTION) glLoadIdentity() gluOrtho2D(0.0, WINDOW_WIDTH, 0.0, WINDOW_HEIGHT) tri = Triangle() tri.set_location(10, 50) tri.set_color(0, 1, 1) self.shapes.append(tri) tri = Triangle() tri.set_location(70, 50) tri.set_color(1, 0, 1) tri.set_size(2, 2) self.shapes.append(tri) tri = Triangle() tri.set_location(300, 50) self.shapes.append(tri) self.Bind(wx.EVT_CONTEXT_MENU, self.OnContextMenu)