package tgls
Build not checkedInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha512=837f030860a8c53d1dad5677240bb106fe4c44270a6615cdf90236fea50882420a303ac6df988b83ef92c1ae5fe6522e39dcb058ef4166422b7978dee4b5143b
Description
Tgls is a set of independent OCaml libraries providing thin bindings to OpenGL libraries. It has support for core OpenGL 3.{2,3} and 4.{0,1,2,3,4} and OpenGL ES 2 and 3.{0,1,2}.
Tgls depends on ocaml-ctypes and the C OpenGL library of your platform. It is distributed under the ISC license.
Home page: http://erratique.ch/software/tgls
README
Tgls — Thin bindings to OpenGL {3,4} and OpenGL ES {2,3} for OCaml
v0.8.6
Tgls is a set of independent OCaml libraries providing thin bindings to OpenGL libraries. It has support for core OpenGL 3.{2,3} and 4.{0,1,2,3,4} and OpenGL ES 2 and 3.{0,1,2}.
Tgls depends on ocaml-ctypes and the C OpenGL library of your platform. It is distributed under the ISC license.
Home page: http://erratique.ch/software/tgls
Installation
Tgls can be installed with opam:
opam install tglsIf you don't use opam consult the opam file for build instructions and a complete specification of the dependencies.
Supported OpenGL versions
Tgls provides four libraries and corresponding ocamlfind packages:
tgl3, supports all functions and enumerants to program with a core OpenGL 3.2 or OpenGL 3.3 context.tgl4, supports all functions and enumerants to program with a core OpenGL 4.0 to 4.5 context.tgles2, supports all functions and enumerants to program with an OpenGL ES 2.0 context.tgles3, supports all functions and enumerants to program with an OpenGL ES 3.0 to 3.2 context.
Compatibility contexts are not supported. For extensions, most of them only add few entry points and/or enumerants, as such it seems the easiest way to access them is to manually use ocaml-ctypes and the appropriate constants (the tools in support could be enhanced to support them but it's not planned to do so).
Documentation
The documentation and API reference is automatically generated by from the interfaces, it can be consulted online or via odig doc tgls.
Sample programs
If you installed tgls with opam sample programs are located in the directory opam config var tgls:doc. Their source has a comment on how to compile them.
In the distribution sample programs are located in the test directory of the distribution. You'll need tsdl to compile them.
They can be built with:
ocamlbuild -use-ocamlfind tests.otargetThe resulting binaries are in _build/test :
linkgl{3,4,es2,es3}.native, tests that the C OpenGL library is correctly linked, the executables should exit with 0.trigl{3,4,es2,es3}.native, opens a window and draws a tricolor triangle, needs tsdl.
The C file assert_sizes.c is a program that should exit with 0 on your platform to ensure the bindings will work correctly.
Dependencies (6)
- ctypes-foreign
-
ctypes
>= "0.4.0" & < "0.21.0" -
topkg
build & >= "1.0.3" & < "1.1.0" -
ocamlbuild
build -
ocamlfind
build -
ocaml
>= "4.08.0"
Dev Dependencies (1)
-
xmlm
dev
Optional Dependencies
None
Used by (2)
- elm_playground_3d_opengl
-
oplot
>= "0.80"
Conflicts
None
Build status
Results of building tgls with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
This version is not in the latest run; the versions below are.
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure