[HOpenGL] ghc-6.0.1 and OpenGL enabled

Wolfgang Thaller wolfgang.thaller at gmx.net
Tue Oct 7 18:45:40 EDT 2003


Patrick Scheibe wrote:

> The push and popMatrix functions dont seem to be there in future. What 
> should
> I use instead of this? If I have the following code:
>
>       pushMatrix
>       GL.translate $ vec2Vector3 pos
>       let ANGLE adir = toAngle dir
> 	  ANGLE aheadangle = toAngle headangle
>       rotate adir $ Vector3 0.0 0.0 (1.0 :: GLfloat)
>       callList $ head ownbodyDL
>       rotate aheadangle $ Vector3 0.0 0.0 (1.0 :: GLfloat)
>       callList $ ownheadDL
>       popMatrix

What you need is matrixExcursion :: IO a -> IO a.

matrixExcursion $ do
     GL.translate $ ....
     ...

(I haven't checked the other functions you are using are all unchanged).


Grüße,

	Wolfgang



More information about the HOpenGL mailing list