luminance-0.11.0.4: Type-safe, type-level and stateless graphics framework

Graphics.Luminance.RenderCmd

Description

Synopsis

# 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 Maybe (BlendingMode,BlendingFactor,BlendingFactor). If you pass Nothing, blending is disabled for that draw command. If you want to enable it, you have to pass Just (mode,srcK,dstK), where mode is the BlendingMode and srcK and dstK are both BlendingFactor representing the source and destination factors.
• depth test: the depth test can be enabled by passing True and disabled with False.

Finally, a RenderCmd holds a value. That value will be consumed later by other functions. In general, it’ll be Geometry.

Instances

 Functor (RenderCmd rw c d) Source # Methodsfmap :: (a -> b) -> RenderCmd rw c d a -> RenderCmd rw c d b #(<\$) :: a -> RenderCmd rw c d b -> RenderCmd rw c d a #

renderCmd :: Maybe (BlendingMode, BlendingFactor, BlendingFactor) -> Bool -> a -> RenderCmd rw c d a Source #

renderCmd blending depthTest a constructs a new RenderCmd.

# Special render commands

stdRenderCmd :: a -> RenderCmd rw c d a Source #

A standard RenderCmd builder.

• no blending
• depth test enabled