[Haskell-cafe] renderString problems

Martin DeMello martindemello at gmail.com
Sun Aug 26 10:32:46 EDT 2007

On 8/26/07, Sven Panne <sven.panne at aedion.de> wrote:
> This is actually not a bug, but a feature. :-) From the Haddock docs for
> renderString:
> ------------------------------------------------------------------------
> Render the string in the named font, without using any display lists.
> Rendering a nonexistent character has no effect.
> If the font is a bitmap font, renderString automatically sets the OpenGL
> unpack pixel storage modes it needs appropriately and saves and restores the
> previous modes before returning. The generated call to bitmap will adjust the
> current raster position based on the width of the string. If the font is a
> stroke font, translate is used to translate the current model view matrix to
> advance the width of the string.
> ------------------------------------------------------------------------
> The rational behind this is that you set a position once, and subsequent
> multiple renderString calls will render the individual strings one after the
> other, just like printf appends strings on the output. If this is not clear
> from the documentation, any suggestions how to improve the docs?

Why not add the rationale to the docs too? Invoking printf should make
the thing jump into focus for anyone who hasn't got it.


More information about the Haskell-Cafe mailing list