Skip to content

SDL2 and 3: wgl GLES 2.0 context by default created as srgb capable with no way to disable it #13055

@edo9300

Description

@edo9300

When initializing an OpenGL ES 2.0 context on windows via wgl, the context is created with srgb capability enabled by default, which my application doesn't support. The issue comes with the fact that by default the WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB flag is "don't care" per the OpenGL spec, but sdl only explicitly set it if the value is nonzero

if (_this->gl_config.framebuffer_srgb_capable) {
*iAttr++ = WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB;
*iAttr++ = _this->gl_config.framebuffer_srgb_capable;
}

so the application will receive an incompatible context.
Would always setting that value, even when 0 be an acceptable fix? And in case, should the same be done in the other opengl context creation functions?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions