def display (self): glutils.clearGL() glutils.drawString('Congratulations! You made top 10.',translate=(0,0.2)) glutils.drawString("Please insert your name (or press Esc):") glutils.drawString(self.playerName,translate=(0,-0.2)) glutSwapBuffers()
def display(self): if self.gameplay.paused: glutils.clearGL() glutils.drawString ("Press p or click when you're ready.") intf.glutSwapBuffers() return if intf.pyCaveOptions ['shadows'] and self.light.casts_shadows: self.light.shadowMap.genMap(self.drawShadowCasters) self.light.shadowMap.genMatrix(self.camera) self.render () self.renderText() intf.glutSwapBuffers ()
def displayFullWindowTexture(texture): ''' texture is a TgaTexture with a gl texture associated. (i.e. texture.name is a GLInt texture name) Will fill the screen with the texture ''' glutils.clearGL() glMatrixMode(GL_MODELVIEW) glLoadIdentity() glMatrixMode(GL_PROJECTION) glLoadIdentity() glDisable(GL_LIGHTING) glEnable(GL_TEXTURE_2D) glActiveTexture(GL_TEXTURE1) glBindTexture(GL_TEXTURE_2D,texture.name) glBegin(GL_QUADS) glMultiTexCoord2f(GL_TEXTURE1,1,1) glVertex3f(1,1,0) glMultiTexCoord2f(GL_TEXTURE1,1,0) glVertex3f(1,-1,0) glMultiTexCoord2f(GL_TEXTURE1,0,0) glVertex3f(-1,-1,0) glMultiTexCoord2f(GL_TEXTURE1,0,1) glVertex3f(-1,1,0) glEnd() glEnable(GL_LIGHTING) glEnable(GL_TEXTURE_2D) glutSwapBuffers()
def display(self): glutils.clearGL() if self.currscore != 0: glutils.drawString("Your score: "+str(int(self.currscore)), translate=(0,0.8), scale=1) glutils.drawString("Highscores: (Press Esc to continue)", translate=(0,0.6)) #glutSwapBuffers() def showElem (i,offset,elem): glPushMatrix() glutils.drawString(str(i) + '- ' + elem.name + ": " + str(int(elem.score)), translate=(0.4,offset), scale=0.8) glPopMatrix() offset = 0.4 i = 1 for elem in reversed(highscores.load()): showElem(i,offset,elem) offset-=0.1 i+=1 glutSwapBuffers()
def display(self): glutils.clearGL() glutils.drawString("Loading...") glutSwapBuffers()
def display(self): glutils.clearGL() glutils.drawString("Entering HARDCORE MODE") intf.glutSwapBuffers() intf.glutPostRedisplay()