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

Safe HaskellNone
LanguageHaskell2010

FWGL.Graphics.Types

Synopsis

Documentation

newtype Draw a Source

A monad that represents OpenGL actions with some state (DrawState).

Constructors

Draw 

Fields

unDraw :: StateT DrawState GL a
 

data DrawState Source

The state of the Draw monad.

data Geometry is Source

A set of attributes and indices.

Constructors

Geometry (AttrList is) [Word16] Int 

Instances

data Mesh is where Source

A static or dinamic geometry.

Constructors

Empty :: Mesh [] 
Cube :: Mesh Geometry3 
StaticGeom :: Geometry is -> Mesh is 
DynamicGeom :: Geometry is -> Geometry is -> Mesh is 

data Object gs is where Source

An object is a set of geometries associated with some uniforms. For example, if you want to draw a rotating cube, its vertices, normals, etc. would be the Geometry, the combination of the geometry and the value of the model matrix would be the Object, and the combination of the object with a Program would be the Layer. In fact, Objects are just descriptions of the actions to perform to draw something. Instead, the Element types in FWGL.Graphics.D2 and FWGL.Graphics.D3 represent managed (high level) objects, and they are ultimately converted to them.

Constructors

ObjectEmpty :: Object gs is 
ObjectMesh :: Mesh is -> Object gs is 
ObjectGlobal :: (Typeable g, UniformCPU c g) => g -> Draw c -> Object gs is -> Object gs' is 
ObjectAppend :: Object gs is -> Object gs' is' -> Object gs'' is'' 

data Layer Source

An object associated with a program. It can also be a layer included in another.

Constructors

forall oi pi og pg . (Subset oi pi, Subset og pg) => Layer (Program pg pi) (Object og oi) 
SubLayer Int Int Layer (Texture -> [Layer])