[Haskell-cafe] Rendering TTF fonts in Haskell and OpenGL

Jeremy Shaw jeremy at n-heptane.com
Sun Feb 17 22:07:08 EST 2008

At Mon, 18 Feb 2008 01:26:17 +0000,
Luke Palmer wrote:

> I have an immature, but precise and picky implementation that renders text in
> a ttf font to an OpenGL texture (using SDL-ttf) here:
> http://svn.luqui.org/svn/misc/luke/work/code/haskell/frp/Fregl/Draw.hs
> (It may have some dependencies in the same directory).  Text support is
> way at the bottom.

Along the same lines, I have an imcomplete, but direct binding to
freetype and an incomplete binding to GLX which can be used to draw
text to opengl textures:


This file contains an example of drawing text using GLX+FreeType:


This code has not been touched in a few years, so it probably needs
some updates to work with ghc 6.8. Also, I believe the X11 package now
has builtin support for ClientMessage, so that module can go away.


More information about the Haskell-Cafe mailing list