GPipe-Core-0.2.3.2: Typesafe functional GPU graphics programming
Safe HaskellNone
LanguageHaskell2010

Graphics.GPipe.Internal.Compiler

Synopsis

Documentation

type CompiledShader os s = s -> Render os () Source #

A compiled shader is just a function that takes an environment and returns a Render action It could have been called CompiledDrawcall or Renderer because it is the same thing.

mapDrawcall :: (s -> s') -> Drawcall s' -> Drawcall s Source #

data RenderIOState s Source #

Constructors

RenderIOState 

Fields

compileDrawcalls :: (Monad m, MonadIO m, MonadException m, ContextHandler ctx) => [IO (Drawcall s)] -> RenderIOState s -> ContextT ctx os m (CompiledShader os s) Source #

May throw a GPipeException The multiple drawcalls to be compiled are intended to use the same environment s (and only one is selected dynamically when rendering). public

addPrimitiveStreamUniform :: Word32 -> Int -> IntMap UniformId (s -> Binding -> IO ()) -> IntMap UniformId (s -> Binding -> IO ()) Source #

bind :: Integral a => IntMap a (s -> Binding -> IO x) -> [(a, a)] -> s -> (x -> IO Bool) -> IO Bool Source #

orderedUnion :: Ord a => [a] -> [a] -> [a] Source #

allocateConsecutiveIndexes :: Integral a => a -> [[a]] -> [[a]] Source #

whenJust' :: (Monad m, Monoid b) => Maybe a -> (a -> m b) -> m b Source #

A whenJust that accepts a monoidal return value. private