This project aims at providing a portable way to do OpenGL (precisely GLES) application
using OCaml. It comes in three parts:
Low level bindings which allow to call directly GLES functions. This binding tries to be
reasonably type-safe using polymorphic variants to encode Glenum type.
The low level bindings also provide some sanity checks for the size of bigarrays which
allow to capture quite a lot of errors with clear messages.
High level bindings: to provide some auxiliary functions like matrix inversion and
ease the development. For instance, to use shaders, with the high level bindings, you use
compile_shader with the sources code, get a value of type unit program. Then, you can
set the variables of the shaders (uniform or attributes), either as constant or function and
get a function to finally run the shaders.
A way to open a window, start the main loop and interact.
Currently only EGL under X11 is supported but it would be nice
to have support for other platforms (windows, OSX, android,
ios, wayland, ...) with exactly the same interface.
develop the high-level bindings guided by more examples
provide support for more platforms (see introduction)
find a way to support multiple version of GLES (at least
2.0, 3.0, 3.1) with only one OCaml library, and possibly in a
transparent way when using the high-level bindings (i.e., the high
lebel bindings should test the version and make the best
collect regexp for error message in GLSL for most GLES
vendors to give good error messages in all cases (only one vendor,
nouveau/mesa supported currently). This is a pity that GLES does no
define a standard at least for position in error messages.