GLCaml

GLCaml - Objective Caml interface for OpenGL
Download

GLCaml Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • Elliott Oti
  • Publisher web site:
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 1.1 MB

GLCaml Tags


GLCaml Description

GLCaml - Objective Caml interface for OpenGL GLCaml is an Objective Caml interface for OpenGL versions 1.1, 1.2, 1.3, 1.4, 1.5, 2.0 and 2.1, plus extensions, for the Mac OS X, Windows, Linux, and Solaris operating systems on both 32-bit and 64-bit machines.It consists of three files: glcaml.mli, glcaml.ml,and glcaml_stub.c, and is intended as a compact drop-in binding rather than a big standalone library.The bindings are generated with the file convert.ml using cleaned up header files from the glext project on Sourceforge. GLCaml is a direct, not particularly type-safe binding to OpenGL.Here are some key features of "GLCaml":· Inspired by camlgl.sourceforge.net, GLCaml loads the OpenGL library dynamically ("OpenGL32.dll" on windows, "libGL.so.1" on Linux, "libGL.dylib" on OS-X)· OpenGL functions are loaded dynamically and memorized, once loaded, to speed up future calls.· Naming conventions are exactly the same as in the traditional 'C' OpenGL API.· Enumerated constants (Glenums) are in GL_ALL_CAPS format.· Where in C an OR-ed combination of Glenums is passed to a function, in OCaml a list of glenums is passed· Function names have the exact same names in OCaml as in 'C'· Where OpenGL functions require an array for either input or output, a Bigarray of the appropriate type is used.· To this end, types for Bigarrays of bytes, floats, ints, doubles etc have been defined.· The function set_failwith -> bool -> unit determines whether a failed GL call throws a Failure exception or fails silently.· This permits graceful recovery from non-available OpenGL functions, if so desired. This binding is wholly automatically generated and contains hundreds of function bindings, the vast majority of which have not been tested. Use at your own risk. What's New in This Release: · Bigarrays are no longer necessary for using OpenGL functions. Standard Ocaml types (ints, floats, bools and strings and corresponding arrays) are now used. · Enumerated constants (glenums) have been replaced by ints. As a result, there are no more GL_ALL_CAPS constants; these have been replaced by gl_no_caps ints · An exception is now always thrown if an OpenGL call is not available. This is because silent fails can leave mutable parameters in an undefined state.


GLCaml Related Software