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
Sep 19, 2014

Sep 17, 2014

Sep 9, 2014

Sep 8, 2014

Sep 7, 2014


Sep 5, 2014

Aug 26, 2014

Aug 21, 2014


Aug 18, 2014

Aug 2, 2014

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