WGL - 选择像素格式和 sRGB 帧缓冲区

发布于 2025-01-11 17:09:55 字数 390 浏览 3 评论 0原文

我有一个旧版 OpenGL 应用程序,它设置基于 ChoosePixelFormat 而不是 wglChoosePixelFormatARBwglGetPixelFormatAttribivARB/wglGetPixelFormatAttribfvARB 的像素格式。 ChoosePixelFormat 不允许使用 WGL_EXT_colorspace 显式设置帧缓冲区颜色空间尽管我注意到调用 glEnable(GL_FRAMEBUFFER_SRB) 提供了颜色空间渲染测试纹理时的转换。它是如何运作的? ChoosePixelFormat 默认设置 sRGB 色彩空间吗?

I have a legacy OpenGL application which sets a pixel format based of ChoosePixelFormat instead of wglChoosePixelFormatARB or wglGetPixelFormatAttribivARB/wglGetPixelFormatAttribfvARB. ChoosePixelFormat doesn't allow to set a framebuffer color space explicitly using WGL_EXT_colorspace Despite that I have noticed that calling glEnable(GL_FRAMEBUFFER_SRB) provides a color space conversion when render a test texture. How does it work ? Does ChoosePixelFormat sets sRGB colorspace by default ?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

森林散布 2025-01-18 17:09:56

您已经回答了自己的问题:

ChoosePixelFormat 不允许显式设置帧缓冲区颜色空间。

ChoosePixelFormat 的规则中没有任何内容禁止实现返回支持 sRGB 编码的像素格式。但这也不是必需的。这里你不能依赖任何东西。但在使用合成器(“Aero”或微软喜欢的任何名称)的现代 Windows 上,您通常会看到 sRGB 支持,但仍然无法保证。

You already answered your own question:

ChoosePixelFormat doesn't allow to set a framebuffer color space explicitly.

There is nothing in the rules for ChoosePixelFormat which forbids an implementation to return a pixel format which supports sRGB encoding. But it is also not required. You can't rely on anything here. But on a modern windows using a compositor ("Aero" or whatever microsoft likes to call it), you typically will see sRGB support, but still there is no guarantee.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文