Commit before moving buffer swapping command

This commit is contained in:
2023-03-02 11:49:40 +00:00
parent 6b0f78d4eb
commit ed8efd21d9
4 changed files with 11 additions and 5 deletions
+6 -5
View File
@@ -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
+1
View File
@@ -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) ->
+1
View File
@@ -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
+3
View File
@@ -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: