mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Hopefully work around an issue where older Intel drivers on Windows use Microsoft's OpenGL 1.1 software renderer instead of failing to create the context, when a requested framebuffer attribute value is unsupported.
Failing to create the context is preferred in that situation because love's code will then try disabling various framebuffer settings to get a hardware-accelerated context using a supported OpenGL version.
This commit is contained in:
@@ -90,6 +90,13 @@ void Window::setGLFramebufferAttributes(int msaa, bool sRGB)
|
|||||||
#if !defined(LOVE_LINUX)
|
#if !defined(LOVE_LINUX)
|
||||||
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, sRGB ? 1 : 0);
|
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, sRGB ? 1 : 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LOVE_WINDOWS)
|
||||||
|
// Avoid the Microsoft OpenGL 1.1 software renderer on Windows. Apparently
|
||||||
|
// older Intel drivers like to use it as a fallback when requesting some
|
||||||
|
// unsupported framebuffer attribute values, rather than properly failing.
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::setGLContextAttributes(const ContextAttribs &attribs)
|
void Window::setGLContextAttributes(const ContextAttribs &attribs)
|
||||||
|
|||||||
Reference in New Issue
Block a user