package tgls

  1. Overview
  2. Docs
Thin bindings to OpenGL {3,4} and OpenGL ES {2,3} for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

tgls-0.8.6.tbz
sha512=837f030860a8c53d1dad5677240bb106fe4c44270a6615cdf90236fea50882420a303ac6df988b83ef92c1ae5fe6522e39dcb058ef4166422b7978dee4b5143b

doc/tgls.tgles2/Tgles2/index.html

Module Tgles2

OpenGL ES 2 thin bindings.

Tgles2 can program OpenGL ES 2 contexts. Consult the binding conventions.

Open the module use it, this defines only the module Gl in your scope. To use in the toplevel with findlib, just #require "tgls.tgles2", it automatically loads the library and opens the Tgles2 module.

References

v0.8.6 — OpenGL ES 2 — homepage

OpenGL ES 2

module Gl : sig ... end

OpenGL ES 2 bindings.

Conventions

To find the name of an OCaml function corresponding to a C function name, map the gl prefix to the module name Tgles2.Gl, add an underscore between each minuscule and majuscule and lower case the result. For example glGetError maps to Tgles2.Gl.get_error

To find the name of an OCaml value corresponding to a C enumerant name, map the GL_ prefix to the module name Tgles2.Gl and lower case the rest. For example GL_COLOR_BUFFER_BIT maps to Tgles2.Gl.color_buffer_bit.

The following exceptions occur:

  • A few enumerant names do clash with functions name. In that case we postfix the enumerant name with _enum. For example we have Tgles2.Gl.viewport and Tgles2.Gl.viewport_enum.
  • If applying the above procedures results in an identifier that doesn't start with a letter, prefix the identifier with a '_'.
  • If applying the above procedures results in an identifier that is an OCaml keyword, suffix the identifier with a '_'.