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

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

Graphics.Luminance.Region

Contents

Description

 

Synopsis

Regions

data Region r m a Source

A Region is a monad transformer used to create relationships between two monadic layers and ensure GPU safety.

Instances

MonadTrans (Region k * r) Source 
Monad m => Monad (Region k * r m) Source 
Functor m => Functor (Region k * r m) Source 
Applicative m => Applicative (Region k * r m) Source 
MonadIO m => MonadIO (Region k * r m) Source 

gpuRegion :: Region () m a -> m a Source

The GPU main Region. This Region is the highest and more general you can find. You’ll need to enter it if you want to enter any GPU specific regions.

newFrame :: MonadIO m => Framebuffer rw c d -> Region Framebuffer m a -> Region () m a Source

The Framebuffer Region. This Region binds a Framebuffer for all children regions.

newShading :: MonadIO m => Some Program -> Region Program m a -> Region Framebuffer m a Source

The Program Region. This Region binds a Program for all children regions.

Drawing

drawGeometry :: MonadIO m => RenderCmd rw c d Geometry -> Region Program m () Source

Draw the Geometry held by a RenderCmd.