rhine-gloss-0.4.0.4: Gloss backend for Rhine

Safe HaskellNone
LanguageHaskell2010

FRP.Rhine.Gloss

Description

Wrapper library to write Gloss applications in Rhine. gloss acts as the backend here.

A Rhine app with the Gloss backend must use the GlossClock, since the gloss API only offers callbacks. In order to run such a reactive program, you have to use flowGloss.

Synopsis

Documentation

type GlossSyncSF a = SyncSF Identity GlossSimulationClock [a] Picture Source #

The type of a SyncSF that you have to implement to get a gloss app.

type GlossRhine a = Rhine Identity (GlossClock a) () Picture Source #

The type of a valid Rhine that can be run by gloss. a is the type of subevents that are selected.

type GlossClock a = SequentialClock Identity (SelectClock GlossEventClock a) GlossSimulationClock_ Source #

The overall clock of a valid rhine SF that can be run by gloss. a is the type of subevents that are selected.

buildGlossRhine Source #

Arguments

:: (Event -> Maybe a)

The event selector

-> GlossSyncSF a

The SyncSF representing the game loop.

-> GlossRhine a 

For most applications, it is sufficient to implement a single synchronous signal function that is called with a list of all relevant events that occurred in the last tick.

flowGloss Source #

Arguments

:: Display

Display mode (e.g. InWindow or FullScreen).

-> Color

Background color.

-> Int

Number of simulation steps per second of real time.

-> GlossRhine a

The gloss-compatible Rhine.

-> IO () 

The main function that will start the gloss backend and run the SF.

module FRP.Rhine