Further strictifying
This commit is contained in:
+7
-7
@@ -46,7 +46,7 @@ doDrawing pdata w = do
|
||||
let rot = _cameraRot w
|
||||
camzoom = _cameraZoom w
|
||||
trans = _cameraCenter w
|
||||
wins = (getWindowX w,getWindowY w)
|
||||
wins = (V2 (getWindowX w) (getWindowY w))
|
||||
(wallPointsCol,windowPoints) = wallsAndWindows w
|
||||
lightPoints = lightsForGloom w
|
||||
viewFroms = _cameraViewFrom w
|
||||
@@ -63,7 +63,7 @@ doDrawing pdata w = do
|
||||
(_foregroundEdgeVerx w)
|
||||
|
||||
-- poke foreground geometry and floor
|
||||
let addC (xx,yy) = (xx,yy,0)
|
||||
let addC (V2 xx yy) = (V3 xx yy 0)
|
||||
nsurfVs <- pokePoint3s (shadVBOptr $ _lightingSurfaceShader pdata)
|
||||
$ polyToTris (map addC $ screenPolygon w)
|
||||
++ concatMap polyToGeoRender' (foregroundPics w)
|
||||
@@ -115,14 +115,14 @@ doDrawing pdata w = do
|
||||
blend $= Disabled
|
||||
drawShader (_bloomBlurShader pdata) 4
|
||||
replicateM_ 3 $ pingPongBetween (_fboFourth1 pdata) (_fboFourth2 pdata) (_bloomBlurShader pdata)
|
||||
viewport $= (Position 0 0, Size (round $ fst wins) (round $ snd wins))
|
||||
viewport $= (Position 0 0, Size (round $ fstV2 wins) (round $ sndV2 wins))
|
||||
blend $= Enabled
|
||||
|
||||
bindFramebuffer Framebuffer $= fst (_fboLighting pdata)
|
||||
viewport $= (Position 0 0
|
||||
,divideSize (w ^. config . shadow_resolution) $ Size (round $ fst wins) (round $ snd wins))
|
||||
,divideSize (w ^. config . shadow_resolution) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
|
||||
createLightMap pdata lightPoints nWalls nSils nsurfVs
|
||||
viewport $= (Position 0 0, Size (round $ fst wins) (round $ snd wins))
|
||||
viewport $= (Position 0 0, Size (round $ fstV2 wins) (round $ sndV2 wins))
|
||||
colorMask $= Color4 Enabled Enabled Enabled Enabled
|
||||
clearColor $= Color4 0 0 0 0
|
||||
|
||||
@@ -163,7 +163,7 @@ doDrawing pdata w = do
|
||||
drawShader (_fullscreenShader pdata) 4
|
||||
rds -> do
|
||||
let bindDrawDist :: (Point2,Point2,Point2,Float) -> IO ()
|
||||
bindDrawDist ((a,b),(c,d),(e,f),g) = do
|
||||
bindDrawDist ((V2 a b),(V2 c d),(V2 e f),g) = do
|
||||
pokeArray (shadVBOptr $ _barrelShader pdata)
|
||||
[a,b,c,d,e,f,g]
|
||||
bindShaderBuffers [_barrelShader pdata] [1]
|
||||
@@ -176,7 +176,7 @@ doDrawing pdata w = do
|
||||
zipWithM_ (>>) bindings $ map bindDrawDist rds
|
||||
activeTexture $= TextureUnit 0
|
||||
-- draw overlay
|
||||
bufferUBO $ isoMatrix 0 1 (0,0) (2,2)
|
||||
bufferUBO $ isoMatrix 0 1 (V2 0 0) (V2 2 2)
|
||||
depthFunc $= Just Always
|
||||
depthMask $= Disabled
|
||||
blend $= Enabled
|
||||
|
||||
Reference in New Issue
Block a user