Geeks3D Forums

GeeXLab => GeeXLab - english forum => Topic started by: JeGX on May 09, 2014, 04:27:18 PM

Title: AntTweakBar plugin
Post by: JeGX on May 09, 2014, 04:27:18 PM
AntTweakBar (http://anttweakbar.sourceforge.net/doc/) support has been added to GLSL Hacker.
This support is currently limited to Lua scripts. Here is a quick overview of how to use the new ATB functions:

(http://www.ozone3d.net/public/jegx/201405/glslhacker-antweakbar-windows.jpg)


INIT script:
Code: [Select]
bar1 = gh_utils.twbar_create("TweakBar")

x = 0
gh_utils.twbar_add_var_float(bar1, "x")



FRAME script:
Code: [Select]
gh_utils.twbar_update()

-- Now the x var is updated and ready for use:
--
gh_utils.font_render(font, 10, 40, 1.0, 1.0, 1.0, 1.0, "x = " .. x)


gh_utils.twbar_draw()



A demo is available in the code sample pack (http://www.geeks3d.com/glslhacker/cs/): host_api/AntTweakBar/

The AntTwekBar plugin is available for Windows, Linux and Mac OS X:

(http://www.ozone3d.net/public/jegx/201405/glslhacker-antweakbar-macosx.jpg)

(http://www.ozone3d.net/public/jegx/201405/glslhacker-antweakbar-linux.jpg)