Author Topic: AntTweakBar plugin  (Read 3349 times)



0 Members and 1 Guest are viewing this topic.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1320
    • View Profile
    • Geeks3D.com
AntTweakBar plugin
« on: May 09, 2014, 04:27:18 PM »
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:
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: host_api/AntTweakBar/

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