Added tank textures
This commit is contained in:
parent
08762ddc9a
commit
5951108c0a
6 changed files with 2258 additions and 1601 deletions
|
@ -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
|
||||
|
|
Reference in a new issue