我有一个小问题,鼠标在glfw;/。它可以在Windows和Ubuntu+Gnome3上工作,但它不能在Ubuntu+Unity上工作。我的鼠标代码(我在游戏中使用它来旋转摄像机):
glfwDisable(GLFW_MOUSE_CURSOR);
int xpos, ypos;
int w,h;
glfwGetMousePos(&xpos, &ypos); // im calculating rot of camera with these values
glfwGetWindowSize(&w,&h); // set mouse
glfwSetMousePos(w/2, h/2); // to center of window.
它只是不工作,但当我设置glfwEnable(GLFW_MOUSE_CURSOR);它正在工作,但是鼠标是可见的;/我该怎么办?
[SOLVED]我不知道为什么,但是当我在显卡设置中启用VSYNC时,鼠标工作得很好。[/解决]