Render cleanup
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
module Shader.Bind (
|
||||
bufferShaderLayers,
|
||||
bufferPokedVBO,
|
||||
bufferEBO,
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import Control.Monad.Primitive
|
||||
import qualified Data.Vector.Fusion.Stream.Monadic as VFSM
|
||||
import qualified Data.Vector.Mutable as MV
|
||||
@@ -22,6 +24,14 @@ bufferPokedVBO theVBO numVs =
|
||||
(fromIntegral $ floatSize * numVs * _vboVertexSize theVBO)
|
||||
(_vboPtr theVBO)
|
||||
|
||||
bufferEBO :: EBO -> Int -> IO ()
|
||||
bufferEBO ebo numis =
|
||||
glNamedBufferSubData
|
||||
(ebo ^. eboName)
|
||||
0
|
||||
(fromIntegral $ glushortSize * numis)
|
||||
(ebo ^. eboPtr)
|
||||
|
||||
bufferShaderLayers :: MV.MVector (PrimState IO) (Shader, VBO) -> UMV.MVector (PrimState IO) Int -> IO ()
|
||||
bufferShaderLayers shads counts = MV.imapM_ f shads
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user