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

Safe HaskellNone
LanguageHaskell2010

FWGL.Graphics.Draw

Synopsis

Documentation

data Draw a

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

data DrawState

The state of the Draw monad.

execDraw

Arguments

:: Draw ()

Action.

-> DrawState

State.

-> GL DrawState 

Execute a Draw action.

drawInit

Arguments

:: (BackendIO, GLES) 
=> Int

Viewport width

-> Int

Viewport height

-> GL DrawState 

Create a DrawState.

drawBegin :: GLES => Draw ()

Clear the buffers.

drawLayer :: (GLES, BackendIO) => Layer -> Draw ()

Draw a Layer.

drawEnd :: GLES => Draw ()

removeProgram :: GLES => Program gs is -> Draw ()

textureSize :: (GLES, BackendIO, Num a) => Texture -> Draw (a, a)

Get the dimensions of a Texture.

setProgram :: GLES => Program g i -> Draw ()

Set the program.

resize

Arguments

:: GLES 
=> Int

Width.

-> Int

Height.

-> GL () 

Viewport.