linux - CPU 时间更改后 GLUT 不更新

标签 linux glut

本周我们在 GLUT/Intel/Linux 上遇到了一个有趣的异常现象。

将 CPU 时间调回 2 分钟后,我们的 GLUT 窗口将有 2 分钟不会更新。

GLUT 是否使用 CPU 时间来更新显示?

最佳答案

freeglut git repo 显示 added support for CLOCK_MONOTONIC in 2012 .

如果您的 GLUT 版本使用 gettimeofday 而不是 clock_gettime(CLOCK_MONOTONIC),则由 fghCheckTimers 驱动的代码设置时间后可能会像您描述的那样。

关于linux - CPU 时间更改后 GLUT 不更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55829793/

相关文章:

c - 替换linux内核函数有错误

mysql - 我怎样才能在 gnu make makefile 中转义反引号

c - 我如何在 cygwin 中链接到 glut32?

OpenGL 将盒子从里到外渲染

macos - GLFW 打开 OpenGL 3.2 上下文但 Freeglut 不能 - 为什么?

linux - eventfd 的 OS X 替代品

python - 套接字关闭和重新绑定(bind) - 如何避免长时间等待?

linux - 在 teamcity linux agent 的构建步骤中运行 grep

c++ - 如何在 OpenGL(使用 GLUT)上绘制像圆锥体一样的填充包络?

c++ - glReadPixels depth_buffer_component 总是返回 1