OpenGLAda is not the first attempt to create an OpenGL binding for Ada. Other bindings are:
- AdaOpenGL: Afaik the first binding that has been developed. It’s a rather thin binding and is not quite up-to-date, but like OpenGLAda, it also includes GLFW bindings.
- Globe3D: This is not only an OpenGL binding, but also provides methods for rendering of 3D objects. The included OpenGL binding is decent and up-to-date, but also rather thin.
- Lumen: Lumen aims to be an interface library for Ada and is currently under development. It includes an auto-generated, very thin OpenGL binding.
- Strong typing: Thanks to extensive usage of Ada’s type system, using the API is much less error-prone than it is in C.
- Dynamic run-time loading of OpenGL functions: OpenGLAda will link properly against OpenGL 1.1 because all functions that were introduced in OpenGL 1.2 or later are loaded at run-time. Functions will also automatically be loaded as ARB or EXT function if available.
- Object-oriented design: All OpenGL objects are wrapped as tagged types. They are also reference-counted, so you do not need to worry about freeing memory yourself.
- OS-agnostic: OpenGLAda builds on MacOSX, Windows and Linux without further configuration.
- Structured: In contrast to the raw OpenGL library, OpenGLAda’s functionality is structured into packages, so you have a better overview over the functionality of the API.
- Automatic exception handling: By default, every OpenGLAda checks after every OpenGL call whether an error flag has been set, and raises the corresponding exception if that’s the case. This makes debugging easier. (You can turn off this feature completely at compile-time.)
- Batteries included: Besides raw OpenGL, OpenGLAda also wraps GLFW (with separate bindings for version 2 and 3) for window creation and user input, SOIL for loading images into textures, and FTGL for using TrueType fonts with OpenGL. These additional bindings are optional; you do not have to use them.
Getting the Code
OpenGLAda is distributed under the terms of the ISC License.