def Draw(self, textObject, x=0, y=0, z=0):
        """ Draw the textobject.
        """
        FontManager.Draw(self, textObject)

        # Get data
        vertices, texCords = textObject._GetFinalData()

        # Translate
        if x or y or z:
            gl.glPushMatrix()
            gl.glTranslatef(x, y, z)

        # Draw
        atlas = self.GetFont(textObject.fontName).atlas
        simpleTextureDraw(vertices, texCords, atlas, textObject.textColor)

        # Un-translate
        if x or y or z:
            gl.glPopMatrix()
 def Draw(self, textObject, x=0, y=0, z=0):
     """ Draw the textobject.
     """
     FontManager.Draw(self, textObject)
     
     # Get data
     vertices, texCords = textObject._GetFinalData()
     
     # Translate
     if x or y or z:
         gl.glPushMatrix()
         gl.glTranslatef(x, y, z)
     
     # Draw
     atlas = self.GetFont(textObject.fontName).atlas
     simpleTextureDraw(vertices, texCords, atlas, textObject.textColor)
     
     # Un-translate
     if x or y or z:
         gl.glPopMatrix()
示例#3
0
 def Draw(self, textObject, x=0, y=0, z=0):
     # Check if we need to recompile in case TEX_SCALE was changed
     if hasattr(textObject, '_tex_scale') and  textObject._tex_scale != TEX_SCALE:
         textObject.Invalidate()
     
     FontManager.Draw(self, textObject)
     
     # Get data
     vertices, texCords = textObject._GetFinalData()
     
     # Translate
     if x or y or z:
         gl.glPushMatrix()
         gl.glTranslatef(x, y, z)
     
     # Draw
     self.shader.Enable()
     simpleTextureDraw(vertices, texCords, self.atlas, textObject.textColor)
     self.shader.Disable()
     
     # Un-translate
     if x or y or z:
         gl.glPopMatrix() 
    def Draw(self, textObject, x=0, y=0, z=0):
        # Check if we need to recompile in case TEX_SCALE was changed
        if hasattr(textObject,
                   '_tex_scale') and textObject._tex_scale != TEX_SCALE:
            textObject.Invalidate()

        FontManager.Draw(self, textObject)

        # Get data
        vertices, texCords = textObject._GetFinalData()

        # Translate
        if x or y or z:
            gl.glPushMatrix()
            gl.glTranslatef(x, y, z)

        # Draw
        self.shader.Enable()
        simpleTextureDraw(vertices, texCords, self.atlas, textObject.textColor)
        self.shader.Disable()

        # Un-translate
        if x or y or z:
            gl.glPopMatrix()