Im writing a display Callback in Haskell using GLUT
here is the beginning:
display :: IORef Float -> IORef [(GLfloat , GLfloat ,GLfloat )] -> IORef Akkord-> DisplayCallback
display remain colors gespielt= do
clear [ ColorBuffer ]
renderPrimitive Quads $ do
--lots of things are rendered
at the very end I'm trying to display a sort of score (gespielt):
g <- get gespielt
color3f 0 0 0
preservingMatrix $ do
renderString Fixed9By15 "Hallo"
flush
"Hallo" is going to get replaced with (Show g)
but the result is the same no text is displayed anywhere
there are no compilation errors and I've tried to change the color and scaling the text
I stole this from the haskell.org OpenGLTutorial:
color3f :: GLfloat -> GLfloat -> GLfloat -> IO ()
color3f r g b = color $ Color3 r g (b :: GLfloat)
what am I doing wrong here?