Broken binding of central picture in one pass
This commit is contained in:
+13
-1
@@ -19,7 +19,7 @@ import Foreign hiding (rotate)
|
||||
import Graphics.Rendering.OpenGL hiding (Line,translate,scale,imageHeight,Polygon,Color,T)
|
||||
--import Data.Foldable
|
||||
--import Data.Tuple.Extra
|
||||
--import qualified Data.IntMap.Strict as IM
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified SDL
|
||||
|
||||
divideSize :: Int -> Size -> Size
|
||||
@@ -152,6 +152,18 @@ renderShader shad dat = do
|
||||
eticks <- SDL.ticks
|
||||
return $ eticks - sticks
|
||||
|
||||
pokeBindFoldableLayer
|
||||
:: Foldable f
|
||||
=> RenderData
|
||||
-> f (Int,RenderType)
|
||||
-> IO (IM.IntMap [(FullShader,Int)])
|
||||
pokeBindFoldableLayer pdata m = do
|
||||
let slist = (,) <$> [0..6] <*> _pictureShaders pdata
|
||||
|
||||
is <- F.foldM (traverse pokeShaderLayer slist) m
|
||||
bindShaderLayer slist is
|
||||
return $ IM.fromListWith (++) $ zipWith (\(i,fs) n -> (i,[(fs,n)])) slist is
|
||||
|
||||
renderFoldable
|
||||
:: Foldable f
|
||||
=> RenderData
|
||||
|
||||
Reference in New Issue
Block a user