コード例 #1
0
    def Draw(self):
        drawing.ResetState()
        drawing.DrawNoTexture(globals.ui_buffer)

        for item in self.drawable_children:
            item.Draw()

        drawing.ResetState()
コード例 #2
0
ファイル: ui.py プロジェクト: tompudding/rogueplanet
    def Draw(self):
        drawing.ResetState()
        drawing.DrawNoTexture(globals.ui_buffer)

        for item in self.drawable_children:
            item.Draw()

        drawing.ResetState()
        drawing.DrawAll(globals.screen_texture_buffer,globals.ui_atlas.texture)
コード例 #3
0
ファイル: game_view.py プロジェクト: tompudding/goshsignal
 def Draw(self):
     #drawing.DrawAll(globals.backdrop_buffer,self.atlas.texture.texture)
     drawing.ResetState()
     drawing.Translate(-self.viewpos.pos.x, -self.viewpos.pos.y, 0)
     drawing.DrawAll(globals.quad_buffer, self.atlas.texture.texture)
     drawing.DrawAll(globals.nonstatic_text_buffer,
                     globals.text_manager.atlas.texture.texture)
コード例 #4
0
ファイル: game_view.py プロジェクト: tompudding/skeleton
 def Draw(self):
     drawing.ResetState()
     drawing.Translate(0, 0, 0)
     #drawing.DrawNoTexture(globals.line_buffer)
     #drawing.DrawNoTexture(globals.colour_tiles)
     #drawing.DrawAll(globals.quad_buffer,self.atlas.texture)
     drawing.DrawAll(globals.nonstatic_text_buffer,
                     globals.text_manager.atlas.texture)
コード例 #5
0
ファイル: game_view.py プロジェクト: tompudding/fullsteam
 def Draw(self):
     drawing.ResetState()
     if self.shake:
         r1 = ((random.random() * 2) - 1)
         r2 = ((random.random() * 2) - 1)
         adjust = (r1 * self.shake, r2 * self.shake)
         drawing.Translate(adjust[0], adjust[1], 0)
     else:
         adjust = (0, 0)
     drawing.DrawNoTexture(globals.line_buffer)
     drawing.DrawNoTexture(globals.colour_tiles)
     drawing.DrawAll(globals.quad_buffer, self.atlas.texture.texture)
     drawing.DrawAll(globals.nonstatic_text_buffer,
                     globals.text_manager.atlas.texture.texture)
     return adjust
コード例 #6
0
 def Draw(self):
     glDisable(GL_TEXTURE_2D)
     glEnableClientState(GL_VERTEX_ARRAY)
     glEnableClientState(GL_COLOR_ARRAY)
     glDisableClientState(GL_TEXTURE_COORD_ARRAY)
     glLoadIdentity()
     glVertexPointerf(globals.ui_buffer.vertex_data)
     glColorPointer(4, GL_FLOAT, 0, globals.ui_buffer.colour_data)
     glDrawElements(GL_QUADS, globals.ui_buffer.current_size,
                    GL_UNSIGNED_INT, globals.ui_buffer.indices)
     glEnable(GL_TEXTURE_2D)
     glEnableClientState(GL_TEXTURE_COORD_ARRAY)
     for item in self.drawable_children:
         item.Draw()
     drawing.ResetState()
     drawing.DrawAll(globals.screen_texture_buffer,
                     globals.atlas.texture.texture)