WGL - 选择像素格式和 sRGB 帧缓冲区
我有一个旧版 OpenGL 应用程序,它设置基于 ChoosePixelFormat
而不是 wglChoosePixelFormatARB
或 wglGetPixelFormatAttribivARB/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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您已经回答了自己的问题:
ChoosePixelFormat
的规则中没有任何内容禁止实现返回支持 sRGB 编码的像素格式。但这也不是必需的。这里你不能依赖任何东西。但在使用合成器(“Aero”或微软喜欢的任何名称)的现代 Windows 上,您通常会看到 sRGB 支持,但仍然无法保证。You already answered your own question:
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.