[Haskell-cafe] renderString problems
dukedave at gmail.com
Wed Aug 1 12:30:53 EDT 2007
I'm having a lot of trouble using renderString from Graphics.UI.GLUT.Fonts.
All my attempts to render a StrokeFont have so far failed.
Using a BitmapFont I can get strings to appear but they demonstrate
the odd behaviour of translating themselves a distance equal to their
length every time my displayCallback function is evaluated.
My requests are:
* Does anyone know how to keep the position fixed?
* Are there any good examples of (working) GLUT code available on
the web, I'm finding it very hard to make any progress at the moment.
Certainly not at Haskell speed :(
I am using the following code:
> import Graphics.UI.GLUT
> main = do
> createWindow ""
> displayCallback $= update
> actionOnWindowClose $= ContinueExectuion
> update = do
> clear [ColorBuffer]
> renderString Fixed8By13 $ "Test string"
More information about the Haskell-Cafe