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

Safe HaskellNone
LanguageHaskell2010

FWGL.Shader

Synopsis

Documentation

type Shader g i o a = PartialShader g i o a Source

type VertexShader g i o = Shader g i (VertexShaderOutput : o) () Source

type FragmentShader g i = Shader g i (FragmentShaderOutput : []) () Source

class Typeable a

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#

Instances

Typeable * Bool 
Typeable * Char 
Typeable * Double 
Typeable * Float 
Typeable * Int 
Typeable * Int8 
Typeable * Int16 
Typeable * Int32 
Typeable * Int64 
Typeable * Integer 
Typeable * Ordering 
Typeable * RealWorld 
Typeable * Word 
Typeable * Word8 
Typeable * Word16 
Typeable * Word32 
Typeable * Word64 
Typeable * () 
Typeable * SpecConstrAnnotation 
Typeable * ThreadId 
Typeable * WordPtr 
Typeable * IntPtr 
Typeable * TypeRep 
Typeable * TyCon 
Typeable * Text 
Typeable * Text 
Typeable * LocalTime 
Typeable * ZonedTime 
Typeable * TimeOfDay 
Typeable * TimeZone 
Typeable * UTCTime 
Typeable * NominalDiffTime 
Typeable * Day 
Typeable * M4 
Typeable * M3 
Typeable * M2 
Typeable * V4 
Typeable * V3 
Typeable * V2 
Typeable * Sampler2D 
Typeable * Float 
Typeable * UV 
Typeable * Position2 
Typeable * View2 
Typeable * Transform2 
Typeable * Depth 
Typeable * Image 
Typeable * UV 
Typeable * Normal3 
Typeable * Position3 
Typeable * View3 
Typeable * Transform3 
Typeable * Texture2 
(Typeable (k1 -> k) s, Typeable k1 a) => Typeable k (s a)

Kind-polymorphic Typeable instance for type application

Typeable ((* -> *) -> Constraint) Alternative 
Typeable ((* -> *) -> Constraint) Applicative 
Typeable (* -> * -> * -> * -> * -> * -> * -> *) (,,,,,,) 
Typeable (* -> * -> * -> * -> * -> * -> *) (,,,,,) 
Typeable (* -> * -> * -> * -> * -> *) (,,,,) 
Typeable (* -> * -> * -> * -> *) (,,,) 
Typeable (* -> * -> * -> *) (,,) 
Typeable (* -> * -> * -> *) STArray 
Typeable (* -> * -> *) (->) 
Typeable (* -> * -> *) Either 
Typeable (* -> * -> *) (,) 
Typeable (* -> * -> *) ST 
Typeable (* -> * -> *) Array 
Typeable (* -> * -> *) STRef 
Typeable (* -> * -> *) HashMap 
Typeable (* -> * -> *) MVector 
Typeable (* -> *) [] 
Typeable (* -> *) Ratio 
Typeable (* -> *) StablePtr 
Typeable (* -> *) IO 
Typeable (* -> *) Ptr 
Typeable (* -> *) FunPtr 
Typeable (* -> *) Maybe 
Typeable (* -> *) STM 
Typeable (* -> *) TVar 
Typeable (* -> *) IORef 
Typeable (* -> *) Vector 
Typeable (* -> Constraint) Monoid 
Typeable (k -> *) (Proxy k) 
Typeable (k -> k -> *) (Coercion k) 
Typeable (k -> k -> *) ((:~:) k) 

class AllTypeable xs Source

Instances

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

data V2 Source

NB: These are different types from V2, V3, etc.

Constructors

V2 Float Float 

data M2 Source

Constructors

M2 V2 V2 

data M3 Source

Constructors

M3 V3 V3 V3 

data M4 Source

Constructors

M4 V4 V4 V4 V4 

type CV2 = V2 Source

type CV3 = V3 Source

type CV4 = V4 Source

type CM2 = M2 Source

type CM3 = M3 Source

type CM4 = M4 Source

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

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

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

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

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

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

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

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

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

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

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

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

(>>=) :: Shader g i o a -> (a -> Shader g i o b) -> Shader g i o b Source

(>>) :: Shader g i o a -> Shader g i o b -> Shader g i o b Source

fail :: String -> Shader g i o a Source

return :: a -> Shader g i o a Source

get :: (Member a i, Typeable a, ShaderType a) => Shader g i o a Source

global :: (Member a g, Typeable a, ShaderType a) => Shader g i o a Source

put :: (Member a o, Typeable a, ShaderType a) => a -> Shader g i o () Source

putVertex :: Member VertexShaderOutput o => V4 -> Shader g i o () Source

putFragment :: Member FragmentShaderOutput o => V4 -> Shader g i o () Source

(.) :: (b -> c) -> (a -> b) -> a -> c infixr 9

Function composition.

id :: a -> a

Identity function.

const :: a -> b -> a

Constant function.

flip :: (a -> b -> c) -> b -> a -> c

flip f takes its (first) two arguments in the reverse order of f.

($) :: (a -> b) -> a -> b infixr 0

Application operator. This operator is redundant, since ordinary application (f x) means the same as (f $ x). However, $ has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example:

    f $ g $ h x  =  f (g (h x))

It is also useful in higher-order situations, such as map ($ 0) xs, or zipWith ($) fs xs.