pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Wiki

CrossPlatformTextOpengl

      
Search:  
 
 

Insert text labels into a pyopengl render. This might not be the fastest code, but it works across platforms. This is the first solution I've found on the web that isn't based on the windows gui library.

import OpenGL.GL as ogl  
def drawText(position, textString):     
    font = pygame.font.Font (None, 64)
    textSurface = font.render(textString, True, (255,255,255,255), (0,0,0,255))     
    textData = pygame.image.tostring(textSurface, "RGBA", True)     
    glRasterPos3d(*position)     
    glDrawPixels(textSurface.get_width(), textSurface.get_height(), GL_RGBA, GL_UNSIGNED_BYTE, textData)
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Nov 13, 2014

Nov 11, 2014


Nov 10, 2014

Nov 9, 2014

Nov 6, 2014


Nov 4, 2014

Nov 3, 2014

Oct 28, 2014

Oct 21, 2014

Oct 16, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)