Use texture array for character rendering, condense rendering

This commit is contained in:
2023-03-23 14:08:07 +00:00
parent 68b43f29ff
commit 3350a8dc30
9 changed files with 80 additions and 42 deletions
+9 -10
View File
@@ -62,7 +62,7 @@ doDrawing' win pdata u = do
-- count mutable vectors setup
layerCounts <- UMV.replicate (numLayers * 6) 0
-- attempt to poke in parallel
let (ws, wp) = wallSPics <> worldSPic cfig w
let (ws, wp) = wallSPics <> worldSPic cfig u
((nWalls, nWins,trueNWalls), (nShapeVs, nIndices, nSilIndices)) <-
MP.bindM3
(\_ a b -> return (a, b))
@@ -373,16 +373,15 @@ doDrawing' win pdata u = do
glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
glBindBufferBase GL_UNIFORM_BUFFER 0 (pdata ^. orthonormalMatUBO)
renderLayer FixedCoordLayer shadV layerCounts
renderFoldable shadV $ fixedCoordPictures u
glDepthMask GL_TRUE
when (debugOn Show_ms_frame $ _uvConfig u) $
renderFoldable
(_pictureShaders pdata)
( setDepth (-1)
. translate (-0.5) (-0.8)
. scale 0.0005 0.0005
$ fpsText (u ^. uvFrameTicks - u ^. uvLastFrameTicks)
)
-- when (debugOn Show_ms_frame $ _uvConfig u) $
-- renderFoldable
-- (_pictureShaders pdata)
-- ( setDepth (-1)
-- . translate (-0.5) (-0.8)
-- . scale 0.0005 0.0005
-- $ fpsText (u ^. uvFrameTicks - u ^. uvLastFrameTicks)
-- )
SDL.glSwapWindow win
fpsText :: (Show a, Ord a, Num a) => a -> Picture