2020-12-14 07:00:06 +00:00
|
|
|
{-# LANGUAGE TypeFamilies #-}
|
|
|
|
module Classes.Graphics.Drawable where
|
|
|
|
|
2020-12-16 17:57:37 +00:00
|
|
|
import qualified Data.Vector as V
|
|
|
|
|
2020-12-14 07:00:06 +00:00
|
|
|
-- iternal imports
|
|
|
|
|
|
|
|
import Types.Graphics.VertexBuffer (Vertex)
|
|
|
|
|
|
|
|
-- | A typeclass for all drawable objects
|
|
|
|
class Drawable a where
|
|
|
|
|
2020-12-16 17:57:37 +00:00
|
|
|
-- -- | List type for resulting vertices and indices
|
|
|
|
-- type VertexList a :: * -> *
|
2020-12-14 07:00:06 +00:00
|
|
|
|
|
|
|
-- | converter function
|
2020-12-16 17:57:37 +00:00
|
|
|
-- toVertices :: a -> ((VertexList a) Word, (VertexList a) Vertex)
|
|
|
|
toVertices :: a -> (V.Vector Word, V.Vector Vertex)
|