Re: ghc-6.0.1 and OpenGL enabled
Wolfgang Thaller <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.hopengl |
|---|---|
| Message-ID | <[email protected]> |
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