Refactor shaders, vbos and vaos

This commit is contained in:
2023-03-14 20:24:08 +00:00
parent 378af69ca5
commit ed0da4bf1d
11 changed files with 147 additions and 101 deletions
+4 -6
View File
@@ -17,13 +17,12 @@ module Shader.Data
, vboName
, vboPtr
, vboAttribSizes
, vboStride
, vboVertexSize
, eboName
, eboPtr
, shadName
, shadVAO'
, shadVAO
, shadPrim'
, shadTex'
, shadUnis'
@@ -39,7 +38,7 @@ import Control.Lens
{- | Datatype containing the necessary information for a single shader. -}
data FullShader = FullShader
{ _shadName :: GLuint -- should be shaderID
, _shadVAO' :: VAO
, _shadVAO :: VAO
, _shadPrim' :: EPrimitiveMode
, _shadTex' :: Maybe ShaderTexture
, _shadUnis' :: Vector GLint
@@ -59,8 +58,7 @@ Vertex attributes are interleaved within the vbo. -}
data VBO = VBO
{ _vboName :: GLuint
, _vboPtr :: Ptr Float
, _vboAttribSizes :: [Int] -- ^ It is not clear to me if this is necessary to store or not
, _vboStride :: Int
, _vboVertexSize :: Int
-- add int for AMOUNT of data poked!
}
data EBO = EBO