blergh
This commit is contained in:
parent
1101910c31
commit
4bf5fa6b87
2 changed files with 17 additions and 6 deletions
11
app/Classes/Renderable.hs
Normal file
11
app/Classes/Renderable.hs
Normal file
|
@ -0,0 +1,11 @@
|
|||
{-# LANGUAGE TypeFamilies #-}
|
||||
module Classes.Renderable where
|
||||
|
||||
class Renderable a where
|
||||
type VertexObjects a :: *
|
||||
|
||||
type ShaderObjects a :: *
|
||||
|
||||
type RenderableInfo a :: *
|
||||
|
||||
draw :: VertexObjects a -> ShaderObjects a -> RenderableInfo a -> IO ()
|
|
@ -5,11 +5,11 @@ import Graphics.Rendering.OpenGL as GL
|
|||
data RenderObjects = RenderObjects
|
||||
{ roVAO :: GL.VertexArrayObject
|
||||
, roVBO :: GL.BufferObject
|
||||
, shader ::
|
||||
}
|
||||
|
||||
class Renderable a where
|
||||
type VertexObjects :: *
|
||||
|
||||
draw = do
|
||||
|
||||
data GL.Uniform u => ShaderObjects u = Shaderobjects
|
||||
{ soVertexShader :: GL.Shader
|
||||
, soFragmentShader :: GL.Shader
|
||||
, soProgram :: GL.Program
|
||||
, soUniforms :: [(String, u)]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue