| Copyright | (C) 2015, 2016 Dimitri Sabadie |
|---|---|
| License | BSD3 |
| Maintainer | Dimitri Sabadie <dimitri.sabadie@gmail.com> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Graphics.Luminance.RenderCmd
Description
- data RenderCmd rw c d a
- renderCmd :: Maybe (BlendingMode, BlendingFactor, BlendingFactor) -> Bool -> a -> RenderCmd rw c d a
- stdRenderCmd :: a -> RenderCmd rw c d a
Render commands
data RenderCmd rw c d a Source #
A GPU render command. That type exists to implement a stateless way to issue draw commands to the GPU. You can set several hints for a given draw command:
- blending: the blending mode is represented by
. If you passMaybe(BlendingMode,BlendingFactor,BlendingFactor)Nothing, blending is disabled for that draw command. If you want to enable it, you have to pass, whereJust(mode,srcK,dstK)modeis theBlendingModeandsrcKanddstKare bothBlendingFactorrepresenting the source and destination factors. - depth test: the depth test can be enabled by passing
Trueand disabled withFalse.
Finally, a RenderCmd holds a value. That value will be consumed later by other functions. In
general, it’ll be Geometry.
renderCmd :: Maybe (BlendingMode, BlendingFactor, BlendingFactor) -> Bool -> a -> RenderCmd rw c d a Source #
Special render commands
stdRenderCmd :: a -> RenderCmd rw c d a Source #
A standard RenderCmd builder.
- no blending
- depth test enabled