Skip to content
A thin PureScript wrapper for WebGL types and methods
PureScript JavaScript Haskell
Branch: master
Clone or download
Pull request Compare This branch is 51 commits ahead, 3 commits behind mgmeier:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


See the module documentation for all exported functions, constants, and types.

This library is the thinnest possible PureScript wrapper for JavaScript WebGL methods, providing just enough to wrap possible null/undefined values in their respective empty contexts. Returned values are wrapped in the Eff monad, using the Canvas effect provided by purescript-canvas for compatibility with general HTMLCanvasElement functions.

This library is generated by parsing the Khronos IDL for the WebGL specification with the included Haskell parser and pretty-printer. This library should not be altered manually but instead by modifying the parser/printer.

This library is not intended for production use, but instead to be wrapped by additional libraries providing type-safety and error checking and handling. Users should note that a returned Nothing value is indicative of a WebGL failure and handle accordingly.

Khronos IDL Parser and PureScript Printer

To build the parser/printer, ensure you have a recent version of Haskell and cabal-install installed, and then:

> cabal sandbox init
> cabal install --only-dependencies
> cabal build

To run the generator on the included IDL and output the contents into the correct PureScript modules:

> cabal run docs/WebGL-1.0.3.idl

If modifying the parser, be sure to regenerate the module documentation by running the default Grunt task. Ensure you have a recent version of Node and npm installed, and then:

> npm install
> bower install
> grunt


This package is built upon the amazing amounts of hard work done by Jurgen Nicklisch-Franken, from whom the original parser/printer was forked.

You can’t perform that action at this time.