Working element buffer object

This commit is contained in:
2021-09-20 12:36:35 +01:00
parent c605ac74ff
commit 5cbcbec101
22 changed files with 242 additions and 212 deletions
+8
View File
@@ -4,6 +4,7 @@
module Shader.Data
( VAO (..)
, VBO (..)
, EBO (..)
, FullShader (..)
, ShaderTexture (..)
, EPrimitiveMode (..)
@@ -19,6 +20,8 @@ module Shader.Data
, vboPtr
, vboAttribSizes
, vboStride
, ebo
, eboPtr
-- | Synonyms
, vert
, geom
@@ -51,6 +54,10 @@ data VBO = VBO
, _vboAttribSizes :: [Int] -- ^ It is not clear to me if this is necessary to store or not
, _vboStride :: Int
}
data EBO = EBO
{ _ebo :: BufferObject
, _eboPtr :: Ptr GLushort
}
{- | Datatype containing the reference to a texture object. -}
newtype ShaderTexture = ShaderTexture
{ _textureObject :: TextureObject }
@@ -75,3 +82,4 @@ frag = FragmentShader
makeLenses ''VAO
makeLenses ''VBO
makeLenses ''FullShader
makeLenses ''EBO