pituicat/src/Graphics/Classes/Drawable.hs

19 lines
481 B
Haskell

{-# LANGUAGE TypeFamilies #-}
module Graphics.Classes.Drawable where
import qualified Data.Vector as V
-- iternal imports
import Graphics.Types.VertexBuffer (Vertex)
-- | A typeclass for all drawable objects
class Drawable a where
-- -- | List type for resulting vertices and indices
-- type VertexList a :: * -> *
-- | Function returning a tuple of Vectors of draw order indices and the
-- appropriate vertices.
toVertices :: a -> (V.Vector Word, V.Vector Vertex)