Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Draw a
- data DrawState
- runDraw :: Draw a -> DrawState -> GL (a, DrawState)
- execDraw :: Draw a -> DrawState -> GL DrawState
- drawInit :: (BackendIO, GLES) => Int -> Int -> Canvas -> GL DrawState
- drawBegin :: GLES => Draw ()
- drawLayer :: (GLES, BackendIO) => Layer -> Draw ()
- drawGroup :: (GLES, BackendIO) => Group gs is -> Draw ()
- drawObject :: (GLES, BackendIO) => Object gs is -> Draw ()
- drawEnd :: GLES => Draw ()
- removeGeometry :: (GLES, BackendIO) => Geometry is -> Draw Bool
- removeTexture :: BackendIO => Texture -> Draw Bool
- removeProgram :: (GLES, BackendIO) => Program gs is -> Draw Bool
- textureUniform :: (GLES, BackendIO) => Texture -> Draw ActiveTexture
- textureSize :: (GLES, BackendIO, Num a) => Texture -> Draw (a, a)
- setProgram :: (GLES, BackendIO) => Program g i -> Draw ()
- resizeViewport :: GLES => Int -> Int -> Draw ()
- gl :: GL a -> Draw a
- renderLayer :: BackendIO => RenderLayer a -> Draw (a, [Texture])
- layerToTexture :: (GLES, BackendIO, Integral a) => [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)
- drawState :: Draw DrawState
Documentation
Create a DrawState
.
removeGeometry :: (GLES, BackendIO) => Geometry is -> Draw Bool Source
Delete a Geometry
from the GPU.
removeProgram :: (GLES, BackendIO) => Program gs is -> Draw Bool Source
Delete a Program
from the GPU.
textureUniform :: (GLES, BackendIO) => Texture -> Draw ActiveTexture Source
This helps you set the uniforms of type Sampler2D
.
textureSize :: (GLES, BackendIO, Num a) => Texture -> Draw (a, a) Source
Get the dimensions of a Texture
.
renderLayer :: BackendIO => 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, BackendIO, Integral a) | |
=> [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.