Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Draw a
- data DrawState
- drawState :: GLES => Int -> Int -> IO DrawState
- drawInit :: GLES => Draw ()
- drawBegin :: GLES => Draw ()
- drawLayer :: GLES => Layer -> Draw ()
- drawGroup :: GLES => Group gs is -> Draw ()
- drawObject :: GLES => Object gs is -> Draw ()
- drawEnd :: GLES => Draw ()
- removeGeometry :: GLES => Geometry is -> Draw ()
- removeTexture :: GLES => Texture -> Draw ()
- removeProgram :: GLES => Program gs is -> Draw ()
- textureUniform :: GLES => Texture -> Draw ActiveTexture
- textureSize :: (GLES, Num a) => Texture -> Draw (a, a)
- setProgram :: GLES => Program g i -> Draw ()
- resizeViewport :: GLES => Int -> Int -> Draw ()
- runDraw :: Draw a -> DrawState -> GL (a, DrawState)
- execDraw :: Draw a -> DrawState -> GL DrawState
- evalDraw :: Draw a -> DrawState -> GL a
- gl :: GL a -> Draw a
- renderLayer :: GLES => RenderLayer a -> Draw (a, [Texture])
- layerToTexture :: (GLES, Integral a) => Bool -> [LayerType] -> a -> a -> Layer -> Either b ([Color] -> Draw b, Int, Int, Int, Int) -> Either c ([Word8] -> Draw c, Int, Int, Int, Int) -> Draw ([Texture], b, c)
- drawGet :: Draw DrawState
Documentation
A state monad on top of GL
.
Create a DrawState
.
textureUniform :: GLES => Texture -> Draw ActiveTexture Source #
This helps you set the uniforms of type Sampler2D
.
renderLayer :: GLES => RenderLayer a -> Draw (a, [Texture]) Source #
Realize a RenderLayer
. It returns the list of allocated Texture
s so
that you can free them if you want.
:: (GLES, Integral a) | |
=> Bool | Draw buffers |
-> [LayerType] | Textures contents |
-> a | Width |
-> a | Height |
-> Layer | Layer to draw |
-> Either b ([Color] -> Draw b, Int, Int, Int, Int) | Color inspecting function, start x, start y, width, height |
-> Either c ([Word8] -> Draw c, Int, Int, Int, Int) | Depth inspecting, function, etc. |
-> Draw ([Texture], b, c) |
Draw a Layer
on some textures.