summaryrefslogtreecommitdiffstats
path: root/src/Render.hs
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-04-14 10:55:22 +0200
committerMatthias Schiffer <matthias@gamezock.de>2010-04-14 10:55:22 +0200
commit5951108c0a47fed6d78e442ae4233d9d34eafe13 (patch)
tree44cbd83564c2529c3fc845ddabbacd27667a9c78 /src/Render.hs
parent08762ddc9ac9be5a4a63b1d15b3955ceb27f76b2 (diff)
downloadhtanks-5951108c0a47fed6d78e442ae4233d9d34eafe13.tar
htanks-5951108c0a47fed6d78e442ae4233d9d34eafe13.zip
Added tank textures
Diffstat (limited to 'src/Render.hs')
-rw-r--r--src/Render.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Render.hs b/src/Render.hs
index 32173c1..91146ba 100644
--- a/src/Render.hs
+++ b/src/Render.hs
@@ -139,8 +139,6 @@ render = do
texCoord $ TexCoord2 0 (lh/2)
vertex $ Vertex2 (0 :: GLfloat) (0 :: GLfloat)
- texture Texture2D $= Disabled
-
bindInterleavedArrays modelTank
forM_ tanklist $ \tank -> unsafePreservingMatrix $ do
@@ -152,7 +150,7 @@ render = do
translate $ Vector3 x y (0 :: GLfloat)
rotate rotDir $ Vector3 0 0 (1 :: GLfloat)
- --textureBinding Texture2D $= Just textureTank
+ textureBinding Texture2D $= Just textureTank
unsafePreservingMatrix $ do
rotate 90 $ Vector3 1 0 (0 :: GLfloat)
@@ -160,14 +158,12 @@ render = do
rotate (rotAim-rotDir) $ Vector3 0 0 (1 :: GLfloat)
- --textureBinding Texture2D $= Just textureCannon
+ textureBinding Texture2D $= Just textureCannon
unsafePreservingMatrix $ do
rotate 90 $ Vector3 1 0 (0 :: GLfloat)
drawObject modelTank 0
- texture Texture2D $= Enabled
-
forM_ bulletlist $ \bullet -> unsafePreservingMatrix $ do
let x = realToFrac . bulletX $ bullet
y = realToFrac . bulletY $ bullet