mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-01 06:44:27 +08:00
render: OpenGL and GLES2 should explicitly request a not-sRGB-capable context.
Reference Issue #14898.
This commit is contained in:
@@ -1838,6 +1838,7 @@ static bool GL_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_Pr
|
|||||||
|
|
||||||
renderer->name = GL_RenderDriver.name;
|
renderer->name = GL_RenderDriver.name;
|
||||||
|
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 0);
|
||||||
data->context = SDL_GL_CreateContext(window);
|
data->context = SDL_GL_CreateContext(window);
|
||||||
if (!data->context) {
|
if (!data->context) {
|
||||||
goto error;
|
goto error;
|
||||||
|
|||||||
@@ -2394,6 +2394,7 @@ static bool GLES2_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL
|
|||||||
renderer->name = GLES2_RenderDriver.name;
|
renderer->name = GLES2_RenderDriver.name;
|
||||||
|
|
||||||
// Create an OpenGL ES 2.0 context
|
// Create an OpenGL ES 2.0 context
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 0);
|
||||||
data->context = SDL_GL_CreateContext(window);
|
data->context = SDL_GL_CreateContext(window);
|
||||||
if (!data->context) {
|
if (!data->context) {
|
||||||
goto error;
|
goto error;
|
||||||
|
|||||||
Reference in New Issue
Block a user