Working dynamic shadows using shape vertices buffer
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user