mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
EGL: Added support for sRGB system framebuffers, when the required EGL extension is present.
This commit is contained in:
parent
c57f409fe8
commit
5a3cc7f580
@ -340,6 +340,18 @@ SDL_EGL_ChooseConfig(_THIS)
|
|||||||
attribs[i++] = _this->gl_config.multisamplesamples;
|
attribs[i++] = _this->gl_config.multisamplesamples;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_this->gl_config.framebuffer_srgb_capable) {
|
||||||
|
#ifdef EGL_KHR_gl_colorspace
|
||||||
|
if (SDL_EGL_HasExtension(_this, "EGL_KHR_gl_colorspace")) {
|
||||||
|
attribs[i++] = EGL_GL_COLORSPACE_KHR;
|
||||||
|
attribs[i++] = EGL_GL_COLORSPACE_SRGB_KHR;
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
return SDL_SetError("EGL implementation does not support sRGB system framebuffers");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
attribs[i++] = EGL_RENDERABLE_TYPE;
|
attribs[i++] = EGL_RENDERABLE_TYPE;
|
||||||
if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
|
if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
|
||||||
#ifdef EGL_KHR_create_context
|
#ifdef EGL_KHR_create_context
|
||||||
|
Loading…
Reference in New Issue
Block a user