Implement poking using Verx lists
This commit is contained in:
+5
-4
@@ -13,13 +13,14 @@ module Shader
|
||||
import Shader.Data
|
||||
import Shader.Parameters
|
||||
import Shader.ExtraPrimitive
|
||||
import Layers
|
||||
--import MatrixHelper
|
||||
|
||||
import Foreign
|
||||
import Control.Monad
|
||||
import Graphics.Rendering.OpenGL hiding (Point,translate,scale,imageHeight)
|
||||
import Graphics.GL.Core43
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
--import qualified Data.IntMap.Strict as IM
|
||||
--import Data.Bifunctor
|
||||
--import Text.RawString.QQ
|
||||
--import Linear.Matrix
|
||||
@@ -59,10 +60,10 @@ bindArrayBuffersLayer numVs lay theVBO = do
|
||||
where
|
||||
stride = sum $ _vboAttribSizes theVBO
|
||||
|
||||
bindShaderLay :: PicShads VShader -> IM.IntMap (PicShads Int) -> IO ()
|
||||
bindShaderLay shads = mapM_ f . IM.toList
|
||||
bindShaderLay :: PicShads VShader -> Layers (PicShads Int) -> IO ()
|
||||
bindShaderLay shads = sequenceLayers_ f
|
||||
where
|
||||
f (lay,counts) = sequence_ $ bindArrayBuffersLayer' lay <$> counts <*> (_vaoVBO . _vshaderVAO <$> shads)
|
||||
f lay counts = sequence_ $ bindArrayBuffersLayer' lay <$> counts <*> (_vaoVBO . _vshaderVAO <$> shads)
|
||||
|
||||
bindShader :: PicShads VShader -> PicShads Int -> IO ()
|
||||
bindShader shads counts = sequence_ $ bindArrayBuffers <$> counts <*> (_vaoVBO . _vshaderVAO <$> shads)
|
||||
|
||||
Reference in New Issue
Block a user