pituicat/src/Classes/Graphics/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 Classes.Graphics.VertexLayout where
import qualified Graphics.Rendering.OpenGL as GL
-- internal imports
import Classes.Graphics.Bindable
class (Bindable (VertBuffer v)) => VertexLayout v where
type VertBuffer v :: *
layoutElements :: v -> [(GL.GLuint, GL.VertexArrayDescriptor GL.GLfloat)]
addBuffer :: v -> VertBuffer v -> IO ()