This commit is contained in:
2022-04-26 08:57:46 +01:00
parent cbef0a37f6
commit 0a4a3b1249
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
module Dodge.ShortShow where
import Geometry
shortPoint2 :: Point2 -> String
shortPoint2 (V2 x y) = "x" ++ show (round x::Int) ++ "y" ++ show (round y::Int)
+2 -2
View File
@@ -21,6 +21,7 @@ import qualified Data.Vector.Mutable as MV
import Control.Monad.Primitive
import qualified Data.Vector.Fusion.Stream.Monadic as VS
import Graphics.GL.Core43
import Control.Monad
divideSize :: Int -> Size -> Size
divideSize i (Size x y) = Size (div x $ fromIntegral i) (div y $ fromIntegral i)
@@ -70,7 +71,7 @@ createLightMap pdata lightPoints nWalls nSils nCaps drawObjShads toPos = do
(marshalEPrimitiveMode $ _shadPrim lwShad)
0
(fromIntegral nWalls)
if drawObjShads then do
when drawObjShads $ do
--draw silhouette shadows
currentProgram $= Just (_shadProg llsShad)
uniform (head $ _shadUnis $ _lightingLineShadowShader pdata)
@@ -92,7 +93,6 @@ createLightMap pdata lightPoints nWalls nSils nCaps drawObjShads toPos = do
(fromIntegral nCaps)
GL_UNSIGNED_SHORT
nullPtr
else return ()
--draw lightmap itself
depthFunc $= Just Always
-- bind world position texture