首页 文章

GLFW鼠标无法在Ubuntu Unity上运行

提问于
浏览
0

我在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);它正在工作,但鼠标是可见的; /我该怎么办?

1 回答

  • 0

    [求助]我不知道为什么,但当我在显卡设置中启用VSYNC时,鼠标运行良好o.o? [/解决了]

相关问题