fwgl- FRP 2D/3D game engine

Safe HaskellNone



The main module. You should also import a backend:

  • FWGL.Backend.JavaScript: GHCJS/WebGL backend (contained in fwgl-javascript)
  • FWGL.Backend.GLFW.GL20: GLFW/OpenGL 2.0 backend (contained in fwgl-glfw)

And a graphics system:

FWGL.Shader contains the EDSL to make custom shaders.



module FWGL.Audio

module FWGL.Input

module FWGL.Utils

module FRP.Yampa

draw :: BackendIO => [Layer] -> Output Source

Draw some layers.

run Source


:: BackendIO 
=> SF (Input ()) Output

Main signal

-> IO () 

Run a FWGL program.

run' Source


:: BackendIO 
=> IO inp

An IO effect generating the custom inputs.

-> SF (Input inp) Output 
-> IO () 

Run a FWGL program, using custom inputs.

loadOBJ :: BackendIO => FilePath -> IO (Either String (Geometry Geometry3)) Source

Load a model from an OBJ file.

loadOBJAsync :: BackendIO => FilePath -> (Either String (Geometry Geometry3) -> IO ()) -> IO () Source

Load a model from an OBJ file asynchronously.

data Output Source

The general output.

(.>) :: Output -> Output -> Output Source

Compose two Output effects.

io :: IO () -> Output Source

Perform an IO action.

freeGeometry :: BackendIO => Geometry i -> Output Source

Delete a Geometry from the GPU.

freeTexture :: BackendIO => Texture -> Output Source

Delete a Texture from the GPU.

freeProgram :: BackendIO => Program g i -> Output Source

Delete a Program from the GPU.