... | ... | @@ -46,40 +46,3 @@ |
|
|
* [Extending ACGL]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The Aachen Computer Graphics Library (we are not very creative with names) is intended to simplify prototyping and development of (OpenGL) graphics applications. It proved a platform independent way for loading OpenGL function pointers, wrappers for OpenGL objects, helper classes (e.g. a camera class) and functions for loading some simple mesh and texture formats. It is not a full rendering engine. Basic knowledge of OpenGL 3.2 or later or OpenGl ES 3.0 is required to understand the basic concepts.
|
|
|
In addition to the library, some examples are provided.
|
|
|
|
|
|
## Getting started
|
|
|
|
|
|
### Compatibility
|
|
|
|
|
|
ACGL should support Linux, MacOS X (10.7 and later) as well as Windows with at least the latest g++ compiler provided by Debian, the latest llvm compiler bundled with XCode on MacOS or the latest VisualStudio. Note that our development is mostly done on Debian and some on MacOS X (10.8), so support for other systems is limited. ACGL is written in C++ with some C++11 features available on the already mentioned compilers.
|
|
|
ACGL is designed for OpenGL 3.2 or later but also works on older versions and even OpenGL ES. On those systems not all features can be supported and testing is limited. Support for OpenGL 2.x / OpenGL ES 2 is very limited.
|
|
|
|
|
|
|
|
|
### OpenGL context
|
|
|
|
|
|
As neither OpenGL nor ACGL are able to create an application window, your code has to provide one. Assuming that you want to write an OpenGL application, your program has to create an OpenGL context capable of at least OpenGL 3.0. While it is possible to create a context without a window, most of the times you want a window to display your graphics using a library like:
|
|
|
|
|
|
* GLFW
|
|
|
* GLUT
|
|
|
* QT (using a QGLWidget)
|
|
|
* some OS specific API, e.g. Cocoa
|
|
|
|
|
|
For simple applications and games we suggest GLFW as it is easy to understand and well supported on all three mayor operating systems while GLUT has some problems with modern MacOS. For UI heavy applications QT can be used. For simple UI support (e.g. some buttons and sliders for settings) the AntTweakBar can be used with either GLFW or QT.
|
|
|
|
|
|
### Getting ACGL
|
|
|
|
|
|
The ACGL library is provided in a git repository on our system in /data/git-repository/acgl/libraries/acgl/ . You should create a git submodule in your repo for this for easy updating of ACGL. To start right away you can look at some GLFW based examples from /data/git-repository/acgl/templates/GLFWExamples/ . Clone this recursively (git clone --recursive file:///data...).
|
|
|
|
|
|
|
|
|
### Getting OpenGL function pointers
|
|
|
|
|
|
In every OpenGL application you have to get the function pointers for OpenGL on your own. Other GLEW is recommended for this but it has some compatibility drawbacks. ACGL provides its own loader that only loads and declares function pointers for a specific OpenGL version that has to be set at compile time with the ACGL_OPENGL_VERSION_xy define (where xy is the version without the dot, e.g. ACGL_OPENGL_VERSION_32) and an optional define to set the core or compatibility profile. When in doubt, set the version to the lowest you need but not lower than 3.2 and the profile to ACGL_OPENGL_PROFILE_CORE. This should be set by your development environment, when working with cmake this can look like this:
|
|
|
|
|
|
ADD_DEFINITIONS(-DACGL_OPENGL_VERSION_33)
|
|
|
ADD_DEFINITIONS(-DACGL_OPENGL_PROFILE_CORE)
|
|
|
|
|
|
To get the function pointers at run time, call ACGL::init(); as soon as an OpenGL context is available (as soon as the window got created in case of GLFW). In case you want to use GLEW, init glew before calling ACGL::init(); |
|
|
\ No newline at end of file |