Merge Picture and RenderType datatypes
This commit is contained in:
@@ -36,7 +36,7 @@ lamp h = defaultInanimate
|
||||
}
|
||||
lampPic :: Float -> Picture
|
||||
lampPic h = pictures
|
||||
[ setLayer 0 $ pictures . map (Poly3D . map ((, blue) . (-.-.- (2.5,2.5,0)))) $ boxXYZ 5 5 (h-1)
|
||||
[ setLayer 0 $ pictures . map (helpPoly3D . map ((, blue) . (-.-.- (2.5,2.5,0)))) $ boxXYZ 5 5 (h-1)
|
||||
, setLayer 1 $ setDepth h $ color white $ circleSolid 3
|
||||
]
|
||||
|
||||
|
||||
+8
-8
@@ -80,20 +80,20 @@ doDrawing pdata w = do
|
||||
else renderBlankWalls pdata nWalls
|
||||
--_ <- renderFoldable pdata $ (picToAlt (Just 0) (polysToPic $ foregroundPics w) :: [RenderType])
|
||||
--_ <- renderFoldable pdata $ (picToAlt (Just 0) pic :: [RenderType])
|
||||
_ <- renderFoldable pdata $ picToLTree Nothing (polysToPic $ foregroundPics w)
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 0) pic
|
||||
_ <- renderFoldable pdata $ map snd (polysToPic $ foregroundPics w)
|
||||
_ <- renderFoldable pdata $ map snd $ filter ((==0).fst) pic
|
||||
_ <- renderShader (_textureArrayShader pdata) (_floorTiles w)
|
||||
|
||||
bindFramebuffer Framebuffer $= fst (_fboBloom pdata)
|
||||
clear [ColorBuffer]
|
||||
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 1) pic
|
||||
_ <- renderFoldable pdata $ map snd $ filter ((==1).fst) pic
|
||||
bindFramebuffer Framebuffer $= fst (_fboColor pdata)
|
||||
clear [ColorBuffer]
|
||||
depthMask $= Disabled
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 3) pic
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 4) pic
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 5) pic
|
||||
_ <- renderFoldable pdata $ map snd $ filter ((==3).fst) pic
|
||||
_ <- renderFoldable pdata $ map snd $ filter ((==4).fst) pic
|
||||
_ <- renderFoldable pdata $ map snd $ filter ((==5).fst) pic
|
||||
|
||||
depthMask $= Enabled
|
||||
bindFramebuffer Framebuffer $= fst (_fboFourth1 pdata)
|
||||
@@ -136,7 +136,7 @@ doDrawing pdata w = do
|
||||
drawShader (_fullscreenShader pdata) 4
|
||||
|
||||
depthFunc $= Just Lequal
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 2) pic
|
||||
_ <- renderFoldable pdata $ map snd $ filter ((==2).fst) pic
|
||||
renderWindows pdata windowPoints
|
||||
|
||||
depthFunc $= Just Always
|
||||
@@ -167,7 +167,7 @@ doDrawing pdata w = do
|
||||
depthMask $= Disabled
|
||||
blend $= Enabled
|
||||
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
|
||||
_ <- renderFoldable pdata (picToLTree Nothing $ fixedCoordPictures w)
|
||||
_ <- renderFoldable pdata $ map snd (fixedCoordPictures w)
|
||||
depthMask $= Enabled
|
||||
|
||||
eTicks <- SDL.ticks
|
||||
|
||||
Reference in New Issue
Block a user