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

Copyright(C) 2015 Dimitri Sabadie
LicenseBSD3
MaintainerDimitri Sabadie <dimitri.sabadie@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Graphics.Luminance.Batch

Contents

Description

 

Synopsis

Framebuffer batch

data FBBatch rw c d Source

Framebuffer batch.

A FBBatch is used to expose a Framebuffer and share it between several shader program batches.

framebufferBatch :: Framebuffer rw c d -> [AnySPBatch rw c d] -> FBBatch rw c d Source

Share a Framebuffer between several shader program batches.

Shader program batch

data SPBatch rw c d u v Source

Shader Program batch.

Such a batch is used to share a Program between several RenderCmd. It also gathers a uniform U u and a u value to send to the uniform.

The u type can be used to send uniforms for the whole batch. It can be useful for cold values – that won’t change very often for a given frame – like the resolution of the screen, the mouse cursor coordinates, the time, and so on and so forth.

The v type variable is used to add uniforms per-RenderCmd.

data AnySPBatch rw c d Source

Abstract SPBatch over uniform interface.

anySPBatch :: SPBatch rw c d u v -> AnySPBatch rw c d Source

Abstract SPBatch.

shaderProgramBatch :: Program -> U u -> u -> [RenderCmd rw c d v Geometry] -> SPBatch rw c d u v Source

Create a new SPBatch.

shaderProgramBatch_ :: Program -> [RenderCmd rw c d v Geometry] -> SPBatch rw c d () v Source

Create a new SPBatch with no uniform interface.