Use DSA for renderbuffers
This commit is contained in:
+4
-4
@@ -27,7 +27,7 @@ bindArrayBuffers numVs theVBO = do
|
||||
(fromIntegral $ floatSize * numVs * sum (_vboAttribSizes theVBO))
|
||||
(_vboPtr theVBO)
|
||||
|
||||
bindShaderLayers :: MV.MVector (PrimState IO) FullShader' -> UMV.MVector (PrimState IO) Int -> IO ()
|
||||
bindShaderLayers :: MV.MVector (PrimState IO) FullShader -> UMV.MVector (PrimState IO) Int -> IO ()
|
||||
bindShaderLayers shads counts = MV.imapM_ f shads
|
||||
where
|
||||
f i shad = do
|
||||
@@ -47,17 +47,17 @@ bindShaderLayers shads counts = MV.imapM_ f shads
|
||||
(fromIntegral $ floatSize * numVs * stride)
|
||||
(_vboPtr theVBO `plusPtr` (floatSize * stride * numSubElements * lay))
|
||||
|
||||
bindShader :: MV.MVector (PrimState IO) FullShader' -> UMV.MVector (PrimState IO) Int -> IO ()
|
||||
bindShader :: MV.MVector (PrimState IO) FullShader -> UMV.MVector (PrimState IO) Int -> IO ()
|
||||
bindShader shads counts = MV.imapM_ f shads
|
||||
where
|
||||
f i shad = UMV.read counts i >>= flip bindArrayBuffers (_vaoVBO . _shadVAO' $ shad)
|
||||
|
||||
bindShaderBuffers :: [FullShader'] -> [Int] -> IO ()
|
||||
bindShaderBuffers :: [FullShader] -> [Int] -> IO ()
|
||||
bindShaderBuffers = zipWithM_ f
|
||||
where
|
||||
f fs i = bindArrayBuffers i $ _vaoVBO $ _shadVAO' fs
|
||||
|
||||
bindShaderBuffers' :: [FullShader'] -> [Int] -> IO ()
|
||||
bindShaderBuffers' :: [FullShader] -> [Int] -> IO ()
|
||||
bindShaderBuffers' = zipWithM_ f
|
||||
where
|
||||
f fs i = bindArrayBuffers i $ _vaoVBO $ _shadVAO' fs
|
||||
|
||||
Reference in New Issue
Block a user