Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 1.88 KB

File metadata and controls

61 lines (44 loc) · 1.88 KB

Graphics.WebGL.Raw

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

Credits

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