Here are some simple program examples with sources that show how to use the AntTweakBar library.
Commented sources of the examples below can be found in the examples
directory of the AntTweakBar library. Executables (compiled examples) can be found in the examples/bin32
and examples/bin64
directories.
To build the examples, please follow the installation instructions.
A simple example using AntTweakBar with OpenGL and GLUT .
This example also demonstrates the use of quaternion and direction types. Quaternions are used to represent rotation, see the following link for a detailed description: http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
A simple example using AntTweakBar with DirectX9 .
A simple example using AntTweakBar with DirectX10. It requires a Windows version that supports at least DirectX10 (Vista, 7,...).
A simple example using AntTweakBar with DirectX11. It requires a Windows version that supports at least DirectX11 (Vista, 7,...).
An example showing many features of AntTweakBar (including definition of custom structure type and variable accessed via callbacks). It also uses OpenGL and GLFW but could be easily adapted to other frameworks.
This example illustrates the different ways to handle String variables. It also uses OpenGL and GLUT but could be easily adapted to other frameworks.
This example illustrates multi-window support. The function TwSetCurrentWindow is used to switch between window contexts.