Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
glut中是否有将鼠标移动到特定位置的功能?SDL (SDL_WarpMouse) 中有一个类似的功能,但我想坚持 glut。
我刚刚找到它,您只需要提出正确的问题,谷歌就会提供帮助:D
它的glutWarpPointer(middleX, middleY);
glutWarpPointer(middleX, middleY)
除非您还隐藏指针,否则这将非常难看。我曾经在一个课堂项目中使用过它,它成功了,但看起来很糟糕。但话又说回来,我用它来模拟纯粹的相对鼠标移动(基本上它不能离开窗口)。但除此之外,是的,它可以完成工作。