Working dynamic shadows using shape vertices buffer

This commit is contained in:
2021-09-22 10:34:39 +01:00
parent 07e128bb04
commit 952ec1c579
16 changed files with 42 additions and 67 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ pokeShape
-> Ptr GLushort -- ^ edge indices pointer
-> Shape
-> IO (Int,Int,Int)
pokeShape vptr iptr ieptr = pokeShapeObjs vptr iptr ieptr (0,0,0) . fst
pokeShape vptr iptr ieptr = pokeShapeObjs vptr iptr ieptr (0,0,0)
pokeShapeObjs
:: Ptr Float
@@ -96,7 +96,7 @@ topPrismEdgeIndices n = concatMap f [0..n-1]
, 1 , 3 ,-1 , 2
]
where
g j = (2 * i + j) `mod` n
g j = (2 * i + j) `mod` (2*n)
topPrismIndices :: Int -> [Int]
topPrismIndices n = concatMap f [1..n-2] -- triangles on top face