Store number of vertices in an intmap
This commit is contained in:
+4
-4
@@ -13,14 +13,14 @@ module Shader
|
||||
import Shader.Data
|
||||
import Shader.Parameters
|
||||
import Shader.ExtraPrimitive
|
||||
import Layers
|
||||
--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
|
||||
@@ -60,8 +60,8 @@ bindArrayBuffersLayer numVs lay theVBO = do
|
||||
where
|
||||
stride = sum $ _vboAttribSizes theVBO
|
||||
|
||||
bindShaderLay :: PicShads VShader -> Layers (PicShads Int) -> IO ()
|
||||
bindShaderLay shads = sequenceLayers_ f
|
||||
bindShaderLay :: PicShads VShader -> IM.IntMap (PicShads Int) -> IO ()
|
||||
bindShaderLay shads = mapM_ (uncurry f) . IM.toList
|
||||
where
|
||||
f lay counts = sequence_ $ bindArrayBuffersLayer' lay <$> counts <*> (_vaoVBO . _vshaderVAO <$> shads)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user