18 lines
452 B
Haskell
18 lines
452 B
Haskell
{-# 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 ()
|