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

Safe HaskellNone
LanguageHaskell2010

FWGL

Description

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.

Synopsis

Documentation

module FWGL.Audio

module FWGL.Input

module FWGL.Utils

module FRP.Yampa

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

Draw some layers.

run

Arguments

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

Main signal

-> IO () 

Run a FWGL program.

run'

Arguments

:: 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))

Load a model from an OBJ file.

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

Load a model from an OBJ file asynchronously.

data Output

The general output.

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

Compose two Output effects.

io :: IO () -> Output

Perform an IO action.

freeGeometry :: BackendIO => Geometry i -> Output

Delete a Geometry from the GPU.

freeTexture :: BackendIO => Texture -> Output

Delete a Texture from the GPU.

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

Delete a Program from the GPU.