AntTweakBar plugin

Started by JeGX, May 09, 2014, 04:27:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JeGX

AntTweakBar 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:




INIT script:

bar1 = gh_utils.twbar_create("TweakBar")

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




FRAME script:

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: host_api/AntTweakBar/

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