Add file
This commit is contained in:
@@ -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
@@ -21,6 +21,7 @@ import qualified Data.Vector.Mutable as MV
|
|||||||
import Control.Monad.Primitive
|
import Control.Monad.Primitive
|
||||||
import qualified Data.Vector.Fusion.Stream.Monadic as VS
|
import qualified Data.Vector.Fusion.Stream.Monadic as VS
|
||||||
import Graphics.GL.Core43
|
import Graphics.GL.Core43
|
||||||
|
import Control.Monad
|
||||||
|
|
||||||
divideSize :: Int -> Size -> Size
|
divideSize :: Int -> Size -> Size
|
||||||
divideSize i (Size x y) = Size (div x $ fromIntegral i) (div y $ fromIntegral i)
|
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)
|
(marshalEPrimitiveMode $ _shadPrim lwShad)
|
||||||
0
|
0
|
||||||
(fromIntegral nWalls)
|
(fromIntegral nWalls)
|
||||||
if drawObjShads then do
|
when drawObjShads $ do
|
||||||
--draw silhouette shadows
|
--draw silhouette shadows
|
||||||
currentProgram $= Just (_shadProg llsShad)
|
currentProgram $= Just (_shadProg llsShad)
|
||||||
uniform (head $ _shadUnis $ _lightingLineShadowShader pdata)
|
uniform (head $ _shadUnis $ _lightingLineShadowShader pdata)
|
||||||
@@ -92,7 +93,6 @@ createLightMap pdata lightPoints nWalls nSils nCaps drawObjShads toPos = do
|
|||||||
(fromIntegral nCaps)
|
(fromIntegral nCaps)
|
||||||
GL_UNSIGNED_SHORT
|
GL_UNSIGNED_SHORT
|
||||||
nullPtr
|
nullPtr
|
||||||
else return ()
|
|
||||||
--draw lightmap itself
|
--draw lightmap itself
|
||||||
depthFunc $= Just Always
|
depthFunc $= Just Always
|
||||||
-- bind world position texture
|
-- bind world position texture
|
||||||
|
|||||||
Reference in New Issue
Block a user