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

Safe HaskellSafe-Inferred
LanguageHaskell2010

FWGL.Shader.Language

Synopsis

Documentation

newtype Sampler2D

A GPU sampler (sampler2D in GLSL).

Constructors

Sampler2D Expr 

data V2

A GPU 2D vector. NB: This is a different type from FWGL.Vector.V2.

Constructors

V2 Float Float 

data V3

A GPU 3D vector.

Constructors

V3 Float Float Float 

data V4

A GPU 4D vector.

Constructors

V4 Float Float Float Float 

data M2

A GPU 2x2 matrix.

Constructors

M2 V2 V2 

data M3

A GPU 3x3 matrix.

Constructors

M3 V3 V3 V3 

data M4

A GPU 4x4 matrix.

Constructors

M4 V4 V4 V4 V4 

class Mul a b c | a b -> c

Types that can be multiplied.

(*) :: (Mul a b c, ShaderType a, ShaderType b, ShaderType c) => a -> b -> c infixl 7

(/) :: (Mul a b c, ShaderType a, ShaderType b, ShaderType c) => a -> b -> c infixl 7

class Sum a

Types that can be added.

Instances

(+) :: (Sum a, ShaderType a) => a -> a -> a infixl 6

(-) :: (Sum a, ShaderType a) => a -> a -> a infixl 6

(^) :: (ShaderType a, ShaderType b) => a -> b -> a infixr 8

(&&) :: Bool -> Bool -> Bool infixr 3

(||) :: Bool -> Bool -> Bool infixr 2

(==) :: ShaderType a => a -> a -> Bool infix 4

(>=) :: ShaderType a => a -> a -> Bool infix 4

(<=) :: ShaderType a => a -> a -> Bool infix 4

(<) :: ShaderType a => a -> a -> Bool infix 4

(>) :: ShaderType a => a -> a -> Bool infix 4