summaryrefslogtreecommitdiff
path: root/Source/Core/Common/GL/GLContext.cpp
diff options
context:
space:
mode:
authorLink Mauve <linkmauve@linkmauve.fr>2026-04-20 16:06:14 +0200
committerLink Mauve <linkmauve@linkmauve.fr>2026-04-20 16:19:45 +0200
commitfc47091592bba840e9a97b2e5717d922992d21e3 (patch)
tree58448c6064d071cc887a86338df2b7ed49a13209 /Source/Core/Common/GL/GLContext.cpp
parent914f5c56217a8a8bb5f28cf3bfa16346a91fa037 (diff)
Remove GLX support
EGL is the de-facto GL context initialization API, including on X11 where it provides many additional features over GLX. I’m planning on adding support for selecting the GPU (adapter in Dolphin-speak) also to OpenGL, similarly to the Vulkan backend, and that will require EGL, so let’s remove the legacy API first.
Diffstat (limited to 'Source/Core/Common/GL/GLContext.cpp')
-rw-r--r--Source/Core/Common/GL/GLContext.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/Source/Core/Common/GL/GLContext.cpp b/Source/Core/Common/GL/GLContext.cpp
index f7b6ca8af8..eef689616e 100644
--- a/Source/Core/Common/GL/GLContext.cpp
+++ b/Source/Core/Common/GL/GLContext.cpp
@@ -14,9 +14,6 @@
#if defined(__HAIKU__)
#include "Common/GL/GLInterface/BGL.h"
#endif
-#if HAVE_X11
-#include "Common/GL/GLInterface/GLX.h"
-#endif
#if HAVE_EGL
#include "Common/GL/GLInterface/EGL.h"
#if HAVE_X11
@@ -79,7 +76,7 @@ void* GLContext::GetFuncAddress(const std::string& name)
}
std::unique_ptr<GLContext> GLContext::Create(const WindowSystemInfo& wsi, bool stereo, bool core,
- bool prefer_egl, bool prefer_gles)
+ bool prefer_gles)
{
std::unique_ptr<GLContext> context;
#if defined(__APPLE__)
@@ -98,22 +95,11 @@ std::unique_ptr<GLContext> GLContext::Create(const WindowSystemInfo& wsi, bool s
if (wsi.type == WindowSystemType::Haiku)
context = std::make_unique<GLContextBGL>();
#endif
+#if HAVE_EGL
#if HAVE_X11
if (wsi.type == WindowSystemType::X11)
- {
-#if defined(HAVE_EGL)
- // GLES 3 is not supported via GLX.
- const bool use_egl = prefer_egl || prefer_gles;
- if (use_egl)
- context = std::make_unique<GLContextEGLX11>();
- else
- context = std::make_unique<GLContextGLX>();
-#else
- context = std::make_unique<GLContextGLX>();
+ context = std::make_unique<GLContextEGLX11>();
#endif
- }
-#endif
-#if HAVE_EGL
if (wsi.type == WindowSystemType::Headless || wsi.type == WindowSystemType::FBDev)
context = std::make_unique<GLContextEGL>();
#endif