JOGL - 启用双缓冲可以提高性能:如何?

发布于 2025-01-03 10:03:11 字数 344 浏览 5 评论 0原文

我使用以下代码启用或禁用双缓冲

GLCapabilities caps = new GLCapabilities(glp);

caps.setDoubleBuffered(false);

现在,我了解到启用双缓冲会降低性能:减少每秒帧数。禁用它会提高 FPS(当然,会出现视觉伪影)。

但我得到的只是相反的结果。当我启用双缓冲时,我得到的 FPS 约为 250(对于具有大约 10K 三角形的模型)。当我禁用双缓冲时,我得到大约 160 FPS(对于同一型号)。

有人可以向我解释一下吗?它是 JOGL 特有的东西还是我用来启用/禁用双缓冲的命令?

谢谢。

I am enabling or disabling double buffering using the following code

GLCapabilities caps = new GLCapabilities(glp);

caps.setDoubleBuffered(false);

Now, I was of the understanding that enabling double buffering would reduce performance : reduce the frames per second. Disabling it would improve FPS (of course, with visual artifacts).

But I am getting just the oppposite results. When I enable double buffering I am getting FPS of around 250 (for a model with around 10K triangles). When I disable double buffering, I get around 160 FPS (for the same model).

Can somebody explain this to me? Is it something specific to JOGL or the commands that I have used to enable/disable double buffering?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文