mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
EGL: Only use EGL_EXT_present_opaque on Wayland
The EGL_EXT_present_opaque extension is primarily a workaround meant for Wayland, even if the language in it doesn't mention this. GLFW previously always enabled this extension where supported. This caused issues on X11 when running the Nvidia binary blob. This commit ensures the extension is only enabled on Wayland. Fixes #2365
This commit is contained in:
parent
68edc66aa4
commit
46cebb5081
@ -252,6 +252,7 @@ video tutorials.
|
|||||||
- Jari Vetoniemi
|
- Jari Vetoniemi
|
||||||
- Ricardo Vieira
|
- Ricardo Vieira
|
||||||
- Nicholas Vitovitch
|
- Nicholas Vitovitch
|
||||||
|
- Vladimír Vondruš
|
||||||
- Simon Voordouw
|
- Simon Voordouw
|
||||||
- Corentin Wallez
|
- Corentin Wallez
|
||||||
- Torsten Walluhn
|
- Torsten Walluhn
|
||||||
|
@ -704,8 +704,11 @@ GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
|
|||||||
if (!fbconfig->doublebuffer)
|
if (!fbconfig->doublebuffer)
|
||||||
SET_ATTRIB(EGL_RENDER_BUFFER, EGL_SINGLE_BUFFER);
|
SET_ATTRIB(EGL_RENDER_BUFFER, EGL_SINGLE_BUFFER);
|
||||||
|
|
||||||
|
if (_glfw.platform.platformID == GLFW_PLATFORM_WAYLAND)
|
||||||
|
{
|
||||||
if (_glfw.egl.EXT_present_opaque)
|
if (_glfw.egl.EXT_present_opaque)
|
||||||
SET_ATTRIB(EGL_PRESENT_OPAQUE_EXT, !fbconfig->transparent);
|
SET_ATTRIB(EGL_PRESENT_OPAQUE_EXT, !fbconfig->transparent);
|
||||||
|
}
|
||||||
|
|
||||||
SET_ATTRIB(EGL_NONE, EGL_NONE);
|
SET_ATTRIB(EGL_NONE, EGL_NONE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user