Skip to content

Commit 0116f62

Browse files
committed
Disable sRGB framebuffer. #99
1 parent c158f0f commit 0116f62

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

platforms/shared/desktop/application.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ static bool sdl_init(void)
291291
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
292292
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
293293
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
294+
#if defined(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE)
295+
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 0);
296+
#endif
294297
#if defined(__APPLE__)
295298
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG);
296299
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);

platforms/shared/desktop/ogl_renderer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ bool ogl_renderer_init(void)
8888
ogl_renderer_opengl_version = (const char*)glGetString(GL_VERSION);
8989
Log("Starting OpenGL %s", ogl_renderer_opengl_version);
9090

91+
glDisable(GL_FRAMEBUFFER_SRGB);
92+
9193
init_shaders();
9294
init_ogl_gui();
9395
init_ogl_emu();

0 commit comments

Comments
 (0)