fwgl-0.1.2.0: FRP 2D/3D game engine

Safe HaskellSafe-Inferred
LanguageHaskell2010

FWGL.Shader.Shader

Synopsis

Documentation

type Shader gs is os = STList gs -> STList is -> STList os Source

A function from a (heterogeneous) set of uniforms and a set of inputs (attributes or varyings) to a set of outputs (varyings).

type Valid gs is os = (StaticList gs, StaticList is, StaticList os, StaticSTList gs, StaticSTList is, StaticSTList os) Source

The condition for a valid Shader.

type Member x xs = IsMember x xs ~ True Source

class AllTypeable xs Source

Instances

AllTypeable ([] *) 
(Typeable * x, AllTypeable xs) => AllTypeable ((:) * x xs) 

class Subset xs ys Source

Instances

(~) Bool (IsSubset xs ys) True => Subset xs ys 

type Equal xs ys = And (IsSubset xs ys) (IsSubset ys xs) ~ True Source

type family Union xs ys Source

Equations

Union [] ys = ys 
Union (x : xs) ys = Union xs (Insert x ys) 

type family Insert y xs Source

Equations

Insert y [] = `[y]` 
Insert y (y : xs) = y : xs 
Insert y (x : xs) = x : Insert y xs 

data STList :: [*] -> * where Source

An heterogeneous set of ShaderTypes and Typeables.

Constructors

N :: STList [] 
(:-) :: (ShaderType a, Typeable a, IsMember a xs ~ False) => a -> STList xs -> STList (a : xs) infixr 4 

stFold :: (forall x. (Typeable x, ShaderType x) => acc -> x -> acc) -> acc -> STList xs -> acc Source

staticList :: StaticList xs => Proxy (xs :: [*]) -> (forall x. (Typeable x, ShaderType x) => x -> y) -> [y] Source

staticSTList :: StaticSTList xs => Proxy (xs :: [*]) -> (forall x. (Typeable x, ShaderType x) => x -> x) -> STList xs Source