03 November 2013

AntTweakBar cursor lag workaround

anttweakbar
AntTweakBar 1.16, Windows build, OpenGL(Core) renderer.
Recently I have noticed that when there is a cursor change when moving between controls some "lag" occurs. It is not seen when you have static scene (or when you change it only via tweak bar), but when there is a smooth animation underneath it can be painful.
Workaround - not a solution - is to disable the cursor changes.
Fortunately in the code we can find:
// TwMgr.cpp, line 86
#ifdef ANT_WINDOWS
    bool g_UseCurRsc = true;    
    // use dll resources for rotoslider cursors
#endif
Just set it to false, rebuild and it should work! No stalls occur in my apps right now.
You can see the code here on the sourceforge repo page.
Title image based on image from the library page: anttweakbar.sourceforge.net/doc/

Interested in new blog posts and bonus content? Sign up for my newsletter.

© 2017, Bartlomiej Filipek, Blogger platform
Any opinions expressed herein are in no way representative of those of my employers.
This site contains ads or referral links, which provide me with a commission. Thank you for your understanding.