Continue shader refactor

This commit is contained in:
2023-04-13 00:10:43 +01:00
parent 36734c7af5
commit 500b2bb2be
2 changed files with 8 additions and 16 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ module Shader.Compile (
setupVertexAttribPointer,
makeSourcedShader,
toFloatVAs,
setupStaticVBO
setupStaticVBOVAO
) where
import Foreign.C.Types
@@ -104,8 +104,8 @@ setupVBO vertexsize = do
-- the input ptr is assumed to contain the correct amount of data according to
-- the specified number and type of vertices
-- note the VBO here does not have a sensible ptr value
setupStaticVBO :: Storable a => [VertexAttribute] -> [a] -> IO (VBO,VAO)
setupStaticVBO vas vdata = withArrayLen vdata $ \i ptr -> do
setupStaticVBOVAO :: Storable a => [VertexAttribute] -> [a] -> IO (VBO,VAO)
setupStaticVBOVAO vas vdata = withArrayLen vdata $ \i ptr -> do
vboname <- mglCreate glCreateBuffers
glNamedBufferStorage
vboname