diff --git a/src/Dodge/Render/Walls.hs b/src/Dodge/Render/Walls.hs index 48bcb0449..d82ce2058 100644 --- a/src/Dodge/Render/Walls.hs +++ b/src/Dodge/Render/Walls.hs @@ -7,9 +7,9 @@ import Control.Lens import Dodge.Base.Wall import Dodge.Data.World import Dodge.Wall.Draw -import Dodge.Zoning.Base -import Dodge.Zoning.Wall -import Dodge.Zoning.World +--import Dodge.Zoning.Base +--import Dodge.Zoning.Wall +--import Dodge.Zoning.World import Geometry import ShapePicture @@ -25,8 +25,9 @@ wallsToDraw w = <*> L.prefilter wlSeeThroughDraw (L.premap f L.list) <*> L.premap getWallSPic L.mconcat ) - (wlsFromIXs w $ zonesExtract (w ^. wlZoning) $ zoneOfSight wlZoneSize cam) - cam = w ^. cWorld . camPos + (w ^. cWorld . lWorld . walls) +-- (wlsFromIXs w $ zonesExtract (w ^. wlZoning) $ zoneOfSight wlZoneSize cam) +-- cam = w ^. cWorld . camPos --wallsToDraw -- :: World diff --git a/src/Loop.hs b/src/Loop.hs index 7633957ee..e02a6661f 100644 --- a/src/Loop.hs +++ b/src/Loop.hs @@ -231,6 +231,7 @@ doConLoop' :: ---- immediately (world -> ConcurrentEffect world) -> -- | simulation update. Allows for side effects such as rendering. + -- passes the window to allow buffer swapping at different times (world -> IO world) -> -- | SDL Event handling. Note no side effects. (world -> Event -> world) -> diff --git a/src/Preload/Render.hs b/src/Preload/Render.hs index abc404e34..3235a3e2f 100644 --- a/src/Preload/Render.hs +++ b/src/Preload/Render.hs @@ -141,6 +141,7 @@ preloadRender = do -- texture shaders, no textures attached fsShad <- makeShaderSized "texture/simple" [vert, frag] [2, 2] 4 ETriangleStrip -- note we directly poke the shader vertex data here + -- could possibly use an indirect draw call pokeArray (shadVBOptr fsShad) $ concat cornerList bloomBlurShad <- makeShaderUsingShaderVAO "texture/bloomBlur" [vert, frag] ETriangleStrip fsShad diff --git a/src/Render.hs b/src/Render.hs index dd5fe6bdb..c5ac532e3 100644 --- a/src/Render.hs +++ b/src/Render.hs @@ -30,6 +30,8 @@ divideSize :: Int -> Size -> Size divideSize i (Size x y) = Size (div x $ fromIntegral i) (div y $ fromIntegral i) -- | Determine where light is shining in the world. +-- think of the produced texture as showing what RGB values should be "taken +-- away" from the shape colors. createLightMap :: RenderData -> [(Point3, Float, Point3)] -> -- Lights @@ -55,6 +57,7 @@ createLightMap pdata lightPoints nWalls nSils nCaps drawObjShads toPos drawCPUSh -- we will not be changing that here depthMask $= Disabled -- clearColor is specified differently in preloadRender + -- the colors are inverted clearColor $= Color4 1 1 1 1 clear [ColorBuffer] -- for each of the lights: