def Render(self, mode=None): BaseContext.Render(self, mode) glDisable(GL_LIGHTING) # context lights by default glTranslatef(1.5, 0.0, -6.0) glRotated(time.time() % (8.0) / 8 * -360, 1, 0, 0) self.texture.render(mode=mode) drawcube.drawCube() self.texture.renderPost(mode=mode)
def Render( self, mode = 0): BaseContext.Render( self, mode ) glTranslatef(1.5,0.0,-6.0); glRotated( time.time()%(8.0)/8 * -360, 1,0,0) drawcube.drawCube() width, height = self.getViewPort() red = glReadPixelsub(0,0, width, height,GL_RED) print 'refcount for array', sys.getrefcount( red ) red = glReadPixels(0,0, width, height,GL_RED, GL_UNSIGNED_BYTE) print 'refcount for string', sys.getrefcount( red )
def Render( self, mode = 0): BaseContext.Render( self, mode ) glTranslatef(1.5,0.0,-6.0); glRotated( time.time()%(8.0)/8 * -360, 1,0,0) drawcube.drawCube() width, height = self.getViewPort() red = glReadPixelsub(0,0, width, height,GL_RED, outputType=None) print 'refcount for array', sys.getrefcount( red ) red = glReadPixels(0,0, width, height,GL_RED, GL_UNSIGNED_BYTE, outputType=None) print 'refcount for string', sys.getrefcount( red )
def Render(self, mode): BaseContext.Render(self, mode) if self.drawCapture and len(self.capturedImage): if self.useStringDraw: glDrawPixels(self.capturedSize[0], self.capturedSize[1], self.capturedImageFormat, GL_UNSIGNED_BYTE, self.capturedImage.tobytes()) else: glDrawPixelsub(self.capturedImageFormat, self.capturedImage) else: glTranslatef( 1.5, 0.0, #-((time.time()%2)*25)-6.0 -6.0, ) glRotated(time.time() % (8.0) / 8 * -360, 1, 0, 0) self.texture.render(mode=mode) drawcube.drawCube() self.texture.renderPost(mode=mode)
def Render( self, mode): BaseContext.Render( self, mode ) if self.drawCapture and len(self.capturedImage): if self.useStringDraw: glDrawPixels( self.capturedSize[0], self.capturedSize[1], self.capturedImageFormat, GL_UNSIGNED_BYTE, self.capturedImage.tostring() ) else: glDrawPixelsub( self.capturedImageFormat, self.capturedImage ) else: glTranslatef( 1.5,0.0, #-((time.time()%2)*25)-6.0 -6.0, ) glRotated( time.time()%(8.0)/8 * -360, 1,0,0) self.texture.render(mode=mode) drawcube.drawCube() self.texture.renderPost(mode=mode)