29 lines
454 B
Haskell
29 lines
454 B
Haskell
{-# LANGUAGE TypeFamilies #-}
|
|
{-# LANGUAGE AllowAmbiguousTypes #-}
|
|
module Classes.Renderable where
|
|
|
|
import qualified Graphics.Rendering.OpenGL as GL
|
|
|
|
import Linear
|
|
|
|
class Renderable a where
|
|
type VertexObjects a :: *
|
|
|
|
type ShaderObjects a :: *
|
|
|
|
init
|
|
:: VertexObjects a
|
|
-> ShaderObjects a
|
|
-> GL.TextureObject
|
|
-> a
|
|
-> IO ()
|
|
|
|
draw
|
|
:: VertexObjects a
|
|
-> ShaderObjects a
|
|
-> a
|
|
-> IO ()
|
|
|
|
clean
|
|
:: a
|
|
-> IO ()
|