Hey, Yesterday I started the wrapping of
AntTweakBar
Image
I have a problem retrieving the values back
I only get the last value of each array
Doing it like:
std::vector<float> g_Float;
DLL_EXPORT int AddVarRWFloat(int BarID, const char* name, float var, const char* def)
{
g_Float.push_back(var);
TwAddVarRW(g_Bar[BarID], name, TW_TYPE_FLOAT, &g_Float[g_Float.size() - 1], def);
return g_Float.size() - 1;
}
DLL_EXPORT float GetVarFloat(int VarID)
{
return g_Float[VarID];
}
As g_Float is a global and is passed by reference to the tweak-bar-variable, it should change with it's corresponding variable of the tweak-bar, right ?
Can you see what I'm doing wrong or is there a better way retrieving Variables ?