| |||||||||||
PyWeek - Cant do textIs there any way to write text on a gl pygame surface?— Neppord on 2007/09/08 00:47 of Dreaming MIrror Games Comments: (log in to comment) |
Last Challenge
September 2008 [entries, ratings] Previous March 2008 [entries, ratings] > September 2007 [entries, ratings] April 2007 [entries, ratings] September 2006 [entries, ratings] March 2006 [entries, ratings] (June 2006) August 2005 [entries, ratings] Not logged in Login | ||||||||||
By aerojockey on 2007/09/08 02:24:
You can create a text image on a Pygame surface using Pygame's font functionality, and then create an OpenGL texture from the Surface data. (It's a little weird with Pygame's unwieldy surface operations, but it should work ok.) There's a recipe on the Pygame site that shows how to turn a surface object into an OpenGL texture. The recipe is for loaded images, but there's no reason it couldn't be adapted for use with a rendered text surface.By Neppord on 2007/09/08 19:19:
did not get it to work.