diff options
Diffstat (limited to 'Demos/Pong/Main.hs')
-rw-r--r-- | Demos/Pong/Main.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Demos/Pong/Main.hs b/Demos/Pong/Main.hs index df90020..b93325d 100644 --- a/Demos/Pong/Main.hs +++ b/Demos/Pong/Main.hs | |||
@@ -9,6 +9,7 @@ import Spear.Math.Matrix4 as Matrix4 hiding (position) | |||
9 | import Spear.Math.Spatial | 9 | import Spear.Math.Spatial |
10 | import Spear.Math.Spatial2 | 10 | import Spear.Math.Spatial2 |
11 | import Spear.Math.Vector | 11 | import Spear.Math.Vector |
12 | import Spear.Physics.Collision | ||
12 | import Spear.Render.Core.Pipeline | 13 | import Spear.Render.Core.Pipeline |
13 | import Spear.Render.Core.State | 14 | import Spear.Render.Core.State |
14 | import Spear.Render.Immediate | 15 | import Spear.Render.Immediate |
@@ -101,11 +102,9 @@ renderBackground = | |||
101 | ,vec2 pmin pmax)] | 102 | ,vec2 pmin pmax)] |
102 | 103 | ||
103 | renderGO :: GameObject -> Game ImmRenderState () | 104 | renderGO :: GameObject -> Game ImmRenderState () |
104 | renderGO go = do | 105 | renderGO go = |
105 | let (AABB2 (Vector2 xmin ymin) (Vector2 xmax ymax)) = aabb go | 106 | let (AABB2Volume (AABB2 (Vector2 xmin ymin) (Vector2 xmax ymax))) = boundingVolume go |
106 | (Vector2 xcenter ycenter) = position go | 107 | in |
107 | immPreservingMatrix $ do | ||
108 | immTranslate (vec3 xcenter ycenter 0) | ||
109 | immDrawQuads2d [ | 108 | immDrawQuads2d [ |
110 | (vec2 xmin ymin | 109 | (vec2 xmin ymin |
111 | ,vec2 xmax ymin | 110 | ,vec2 xmax ymin |