Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Buffer
- data Layer
- layer :: (Subset progAttr grpAttr, Subset progUni grpUni) => Program progUni progAttr -> Object grpUni grpAttr -> Layer
- over :: Layer -> Layer -> Layer
- clear :: [Buffer] -> Layer -> Layer
- type Compatible pgs vgs fgs = EqualOrErr pgs (Union vgs fgs) ((((Text "Incompatible shader uniforms" :$$: (Text " Vertex shader uniforms: " :<>: ShowType vgs)) :$$: (Text " Fragment shader uniforms: " :<>: ShowType fgs)) :$$: (Text " United shader uniforms: " :<>: ShowType (Union vgs fgs))) :$$: (Text " Program uniforms: " :<>: ShowType pgs))
- data Program gs is
- program :: (ShaderVars vgs, ShaderVars vis, VOShaderVars os, ShaderVars fgs, Compatible pgs vgs fgs) => VertexShader vgs vis os -> FragmentShader fgs os -> Program pgs vis
- subLayer :: Int -> Int -> Layer -> (Texture -> Layer) -> Layer
- colorSubLayer :: Int -> Int -> Layer -> (Texture -> Layer) -> Layer
- depthSubLayer :: Int -> Int -> Layer -> (Texture -> Layer) -> Layer
- colorDepthSubLayer :: Int -> Int -> Layer -> (Texture -> Texture -> Layer) -> Layer
- colorStencilSubLayer :: Int -> Int -> Layer -> (Texture -> Layer) -> Layer
- colorSubLayer' :: Int -> Int -> Layer -> Int -> Int -> Int -> Int -> (Texture -> [Color] -> Layer) -> Layer
- depthSubLayer' :: Int -> Int -> Layer -> Int -> Int -> Int -> Int -> (Texture -> [Word8] -> Layer) -> Layer
- colorDepthSubLayer' :: Int -> Int -> Layer -> Int -> Int -> Int -> Int -> (Texture -> Texture -> [Color] -> [Word8] -> Layer) -> Layer
- colorStencilSubLayer' :: Int -> Int -> Layer -> Int -> Int -> Int -> Int -> (Texture -> [Color] -> Layer) -> Layer
- buffersSubLayer :: Int -> Int -> Int -> Layer -> ([Texture] -> Layer) -> Layer
- buffersDepthSubLayer :: Int -> Int -> Int -> Layer -> ([Texture] -> Texture -> Layer) -> Layer
- buffersStencilSubLayer :: Int -> Int -> Int -> Layer -> ([Texture] -> Layer) -> Layer
Documentation
layer :: (Subset progAttr grpAttr, Subset progUni grpUni) => Program progUni progAttr -> Object grpUni grpAttr -> Layer Source #
Create a simple Layer from a Program and an Object.
over :: Layer -> Layer -> Layer infixl 1 Source #
Draw the first Layer over the second one. This means that the first Layer will use the same buffers (color, depth, stencil) of the second, but the visibility of the objects still depends on their depth.
Programs
type Compatible pgs vgs fgs = EqualOrErr pgs (Union vgs fgs) ((((Text "Incompatible shader uniforms" :$$: (Text " Vertex shader uniforms: " :<>: ShowType vgs)) :$$: (Text " Fragment shader uniforms: " :<>: ShowType fgs)) :$$: (Text " United shader uniforms: " :<>: ShowType (Union vgs fgs))) :$$: (Text " Program uniforms: " :<>: ShowType pgs)) Source #
Compatible shaders.
A vertex shader associated with a compatible fragment shader.
program :: (ShaderVars vgs, ShaderVars vis, VOShaderVars os, ShaderVars fgs, Compatible pgs vgs fgs) => VertexShader vgs vis os -> FragmentShader fgs os -> Program pgs vis Source #
Create a Program
from the shaders.
Sublayers
:: Int | Texture width. |
-> Int | Texture height. |
-> Layer | Layer to draw on the
|
-> (Texture -> Texture -> Layer) | Color, depth. |
-> Layer |
Combination of colorSubLayer
and depthSubLayer
.
:: Int | Texture width. |
-> Int | Texture height. |
-> Layer | Layer to draw on a |
-> (Texture -> Layer) | Color. |
-> Layer |
colorSubLayer
with a stencil buffer.
:: Int | Texture width. |
-> Int | Texture height. |
-> Layer | Layer to draw on a |
-> Int | First pixel to read X |
-> Int | First pixel to read Y |
-> Int | Width of the rectangle to read |
-> Int | Height of the rectangle to read |
-> (Texture -> [Color] -> Layer) | Function using the texture. |
-> Layer |
Extended version of colorSubLayer
that reads and converts the Texture
pixels.
:: Int | Texture width. |
-> Int | Texture height. |
-> Layer | Layer to draw on a depth |
-> Int | First pixel to read X |
-> Int | First pixel to read Y |
-> Int | Width of the rectangle to read |
-> Int | Height of the rectangle to read |
-> (Texture -> [Word8] -> Layer) | Layers using the texture. |
-> Layer |
Extended version of depthSubLayer
. Not supported on WebGL.
:: Int | Texture width. |
-> Int | Texture height. |
-> Layer | Layer to draw on a |
-> Int | First pixel to read X |
-> Int | First pixel to read Y |
-> Int | Width of the rectangle to read |
-> Int | Height of the rectangle to read |
-> (Texture -> Texture -> [Color] -> [Word8] -> Layer) | Layers using the texture. |
-> Layer |
Extended version of colorDepthSubLayer
. Not supported on WebGL.
colorStencilSubLayer' Source #
:: Int | Texture width. |
-> Int | Texture height. |
-> Layer | Layer to draw on a |
-> Int | First pixel to read X |
-> Int | First pixel to read Y |
-> Int | Width of the rectangle to read |
-> Int | Height of the rectangle to read |
-> (Texture -> [Color] -> Layer) | Function using the texture. |
-> Layer |
colorSubLayer'
with an additional stencil buffer.
:: Int | Textures width. |
-> Int | Textures height. |
-> Int | Number of colors. |
-> Layer | Layer to draw. |
-> ([Texture] -> Texture -> Layer) | Function using the buffers textures and the depth texture. |
-> Layer |
Combination of buffersSubLayer
and depthSubLayer
.