Tweak clouds

This commit is contained in:
2023-03-20 18:24:07 +00:00
parent 695f849f77
commit 7d0bb7f229
11 changed files with 88 additions and 63 deletions
+1
View File
@@ -8,6 +8,7 @@ module Shader.Compile (
makeShaderSized,
makeShaderUsingVAO,
setupVAO,
setupEBO,
setupVertexAttribPointer,
) where
+2 -2
View File
@@ -10,8 +10,8 @@ import Graphics.GL.Core45
pokeCloud :: Ptr Float -> Ptr GLushort -> (Int, Int) -> Cloud -> IO (Int, Int)
pokeCloud vptr iptr (nv,ni) cl = do
UV.imapM_ (pokeCloudVerx vptr cl nv) $ UV.fromList [(1, 1), (1, -1), (-1, -1), (-1, 1)]
UV.imapM_ (pokeCloudIndex iptr nv ni) $ UV.fromList [0, 1, 2, 2, 1, 3]
UV.imapM_ (pokeCloudVerx vptr cl nv) $ UV.fromList [(1, 1), (-1, 1), (-1, -1), (1, -1)]
UV.imapM_ (pokeCloudIndex iptr nv ni) $ UV.fromList [0, 1, 2, 2, 0, 3]
return (nv + 4, ni + 6)
pokeCloudVerx :: Ptr Float -> Cloud -> Int -> Int -> (Float, Float) -> IO ()