16 lines
376 B
Haskell
16 lines
376 B
Haskell
|
{-# LANGUAGE TypeFamilies #-}
|
||
|
module Classes.Graphics.Drawable where
|
||
|
|
||
|
-- iternal imports
|
||
|
|
||
|
import Types.Graphics.VertexBuffer (Vertex)
|
||
|
|
||
|
-- | A typeclass for all drawable objects
|
||
|
class Drawable a where
|
||
|
|
||
|
-- | List type for resulting vertices and indices
|
||
|
type VertexList a :: * -> *
|
||
|
|
||
|
-- | converter function
|
||
|
toVertices :: a -> ((VertexList a) Word, (VertexList a) Vertex)
|