hylogen-0.1.3.2: an EDSL for live-coding fragment shaders

Safe HaskellNone
LanguageHaskell2010

Hylogen.Program

Description

Internal shader program representation.

Synopsis

Documentation

newtype Id Source

Constructors

Id Int 

Instances

data Statement Source

Statement internal representation

We tag a Statement with a Unique ID and its corresponding untyped expression

Constructors

NewAssign (Unique, ExprMonoF Unique) 

Instances

newtype Function Source

GLSL Function internal representation

A Function is composed of Statements.

Constructors

Function [Statement] 

Instances

monoToProgram :: ExprMono -> Function Source

Returns a program given an expression in closed untyped form

type Program = Function Source

A GLSL program. Currently synonym for Function.

toProgram :: Vec4 -> Program Source

Helper function from a Vec4 to A GLSL Program, with sharing.