pituicat/src/Graphics/Classes/VertexLayout.hs

19 lines
452 B
Haskell
Raw Normal View History

2020-12-06 07:14:50 +00:00
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
module Graphics.Classes.VertexLayout where
2020-12-06 07:14:50 +00:00
import qualified Graphics.Rendering.OpenGL as GL
-- internal imports
import Graphics.Classes.Bindable
2020-12-06 07:14:50 +00:00
class (Bindable (VertBuffer v)) => VertexLayout v where
type VertBuffer v :: *
layoutElements :: v -> [(GL.GLuint, GL.VertexArrayDescriptor GL.GLfloat)]
addBuffer :: v -> VertBuffer v -> IO ()