Commit before unifying vertex type

This commit is contained in:
jgk
2021-08-09 12:42:42 +02:00
parent ad4a70635b
commit 8cda9b4e1b
3 changed files with 28 additions and 172 deletions
-9
View File
@@ -148,8 +148,6 @@ pokeBindFoldable
-> IO (PicShads Int)
pokeBindFoldable pdata m = do
let shads = _pictureShaders pdata
--counts = zeroCounts
--elist <- foldM (pokeVX' shads) counts m
elist <- pokeVerxs (fmap (_vaoVBO . _vshaderVAO) shads) m
bindShader shads elist
return elist
@@ -163,11 +161,8 @@ pokeBindFoldableLayer
-> IO (IM.IntMap (PicShads Int))
pokeBindFoldableLayer pdata m = do
let shads = _pictureShaders pdata
--slist'' <- fmap toIMLayers $ pokeLayVerxsFold (fmap (_vaoVBO . _vshaderVAO) shads) m
slist'' <- pokeLayVerxsFold (fmap (_vaoVBO . _vshaderVAO) shads) m
bindShaderLay shads slist''
return slist''
renderFoldable
@@ -176,19 +171,15 @@ renderFoldable
-> IO Word32
renderFoldable pdata struct = do
pokeStartTicks <- SDL.ticks
count <- pokeBindFoldable pdata struct
let shads = _pictureShaders pdata
sequence_ (drawShaderLay 0 <$> shads <*> count)
pokeEndTicks <- SDL.ticks
return $ pokeEndTicks - pokeStartTicks
------------------------------end renderFoldable
renderLayer :: Int -> PicShads VShader -> IM.IntMap (PicShads Int) -> IO ()
renderLayer i shads counts = sequence_ $ drawShaderLay i <$> shads <*> counts IM.! i
where
pokeTwoOff
:: Ptr Float