1 ----------------------------------------
3 Copyright : BSD License
5 Maintainer : Berlin Brown
12 ----------------------------------------
14 module MechDisplay
(displayGameLoop
, idle
) where
16 import Graphics
.Rendering
.OpenGL
17 import Graphics
.UI
.GLUT
23 -- Core display game loop, including rendering the scene
24 -- and swapping the GL double buffer.
25 displayGameLoop mechObjRef rotationMatrix
= do
27 curMech
<- get mechObjRef
28 prevMatrix
<- get rotationMatrix
32 curMatrix
<- get
((matrix
$ Just
$ Modelview
0)::StateVar
(GLmatrix GLdouble
))
35 scale
0.06 0.06 (0.06::GLfloat
)
38 -- Render the terrain, including the flat plain
42 renderBasicMech curMech
44 -- OpenGL, swap buffers
48 -- Idle function, do nothing