AntTweakBar allows programmers to quickly add a light and intuitive graphical user interface into graphic programs to interactively tweak them. AntTweakBar is a small and easy to use library that can be readily integrated into OpenGL and DirectX applications.
Program variables can be linked to a graphical control that allows users to modify them. Thus, parameters exposed by programmers can be easily modified. They are displayed into the graphical application through one or more embeded windows called tweak bars.
Design and integration:
The library is designed to minimize programmer work while offering a fast, clean, intuitive and non-invasive graphical interface. For instance, numerical values are automatically mapped to a RotoSlider control for rapid editing.
It is composed of few functions. Common variables like booleans, integers, floats and enums can be directly mapped to a graphic control through pointers or callback functions. Additionnal editing informations like min and max values can be provided. Keyboard shortcuts can also be associated to controls and an help window which summurizes these shortcuts can be displayed. Programmers are not required to design the graphical interface by providing coordinates or by using a visual UI editor. Controls are automatically organized following an optional given hierarchy. In most cases, only one line of code is needed to add a new variable to a tweak bar.
The AntTweakBar library mainly targets graphical programs that need an easy way to tweak parameters and see the result in real-time like 3D demos, light inline game editors, small 3D applications, prototypes, debug facilities of weighter graphical programs, etc.
While the library itself is written in C++, its programming interface is a C interface, and then it can be directly integrated in any C++ or C program.
It has been designed with performance in mind. Embeded in a typical 3D application, its rendering time is almost insignificant. Bars can also be iconified to fully minimize their rendering time.
- Added 64 bit version of the library.
- Added multiple windows support (Inspired by comments and code from Evan F. and Ivo H.). See new function TwSetCurrentWindow.
- Better MacOSX support (Thanks to Alexis DH., Fabrice N., Diederick H., Alec J.).
- Improved readability of overlapped transparent bars. Content of overlapped regions is clipped and not drawn. This behavior can be disabled using the bar parameter overlap.
- Added support for Direct3D11 + example.
- Added support for SDL 1.3 integration in addition to SDL 1.2. ABI modification: TwEventSDL takes SDL version as an additional parameter.
- Added support for SFML 1.6 integration.
- Added support for GLFW 2.7 integration in addition to GLFW 2.6. This may imply changing the calling convention of event callbacks. Can be done by defining GLFW_CDECL before including AntTweakBar.h if needed.
- Added function TwKeyTest that checks if a key event would be processed by AntTweakBar but without processing it. Needed to fix bad handling report of WM_KEYUP...