[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Re: BOUNCE pygame-users@seul.org: Non-membersubmission from ["David Keeney" <dkeeney@travelbyroad.net>]
Lì giovedì, 2004/06/24 alle 08:06, -0700, Pete Shinners ha scritto:
> > I am looking at converting some code from GLUT to PyGame.
> > Does the font functionality work in OpenGL display mode, or is there
> > a workaround way to display text to an OpenGL display using
> > PyGame?
> >
> > The code in question uses GLUT raster text, and would need an
> > alternate method of displaying text.
>
> David, Pygame itself has nothing for fonts in opengl. The only direct
> solution I can think of is to render the text, convert it to a texture,
> and have opengl draw it with a textured quad.
I have borrowed some code from pyUI, changed it a little bit and made it
into a Font class that load any font available from pygame and render it
into a texture. it is just 100 lines but I don't know the policy of this
list about long emails containing code. just send? :)
--
Federico Di Gregorio http://people.initd.org/fog
Debian GNU/Linux Developer fog@debian.org
INIT.D Developer fog@initd.org
Gli esseri umani, a volte, sono destinati, per il solo fatto di
esistere, a fare del male a qualcuno. -- Haruki Murakami