TwWindowSize (function)DescriptionCall this function to inform AntTweakBar of the size of the application graphics window, or to restore AntTweakBar graphics resources (after a fullscreen switch for instance). This function is time consuming because it restores graphics resources (such as textures needed by AntTweakBar to display text efficiently), so it must be called only when necessary: when the size of the application graphics window has changed, or when the graphics context has been restored (if graphics mode has changed for instance). Note that if you are using SDL, GLUT, GLFW or Windows (DirectX), the library provides some helper functions to handle events like window resizing. See the section how to integrate for more details.
The size must be the actual client size of the graphics window, excluding system menu and other decorations. For instance on windows RECT r; GetClientRect(hWnd, &r); TwWindowSize(r.right - r.left, r.bottom - r.top);
If you need to release the graphics resources allocated by AntTweakBar, call ParameterswidthWidth of the graphics window. heightHeight of the graphics window. Return value
See also |