renderString problems
"Dave Tapley" <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.hopengl,gmane.comp.lang.haskell.cafe |
|---|---|
| Message-ID | <[email protected]> |
Hi all, 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 > getArgsAndInitialize > createWindow "" > displayCallback $= update > actionOnWindowClose $= ContinueExectuion > mainLoop > > update = do > clear [ColorBuffer] > renderString Fixed8By13 $ "Test string" > flush Cheers, Dave