AntTweakBar尽管不被支持"现在仍然广泛使用或至少。但是,我无法接受GLFW 3.2键盘的输入。当我使用
创建一个简单的GUI面板和一个调整栏TwBar *myBar;
myBar = TwNewBar("NameOfMyTweakBar");
double speed = .3;
TwAddVarRW(myBar, "speed", TW_TYPE_DOUBLE, &speed, "label='Rot Speed' min=0 max=2 step=0.01 keyIncr=s keyDecr=S help='Rotation speed (turns/second)' ");
然后尝试让它接受键输入它返回0.我已经尝试了char回调,但没有运气。这个图书馆是否已经过时了? 还有哪些类似的库可供选择?
void glfwKeyCallback(GLFWwindow *myWin, int key, int scancode, int action, int mods)
{
cout << "TwEventKeyGLFW = " << TwEventKeyGLFW(key, action) << endl;
}