canvas/app/Classes/Renderable.hs

30 lines
454 B
Haskell
Raw Permalink Normal View History

2020-02-06 13:41:06 +00:00
{-# LANGUAGE TypeFamilies #-}
2020-02-06 22:18:05 +00:00
{-# LANGUAGE AllowAmbiguousTypes #-}
2020-02-06 13:41:06 +00:00
module Classes.Renderable where
2020-02-07 23:15:53 +00:00
import qualified Graphics.Rendering.OpenGL as GL
import Linear
2020-02-06 13:41:06 +00:00
class Renderable a where
type VertexObjects a :: *
type ShaderObjects a :: *
2020-02-07 23:15:53 +00:00
init
:: VertexObjects a
-> ShaderObjects a
-> GL.TextureObject
-> a
-> IO ()
2020-02-06 13:41:06 +00:00
2020-02-07 23:15:53 +00:00
draw
:: VertexObjects a
-> ShaderObjects a
-> a
-> IO ()
2020-02-07 13:57:09 +00:00
2020-02-07 23:15:53 +00:00
clean
:: a
-> IO ()