Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Rauch <Rauch.Christian@gmx.de>2022-06-25 02:19:35 +0300
committerChristian Rauch <Rauch.Christian@gmx.de>2022-07-04 11:48:45 +0300
commit55331ea26e09d00523d0584ae120c1ed369d66c4 (patch)
tree4282a16efab2cadcbd5175c553e17745e8efb3d5
parent7cedeb8b0eca2260bcadb2e699cc08667c880f77 (diff)
GLX: replace GLEW by libepoxy
-rw-r--r--intern/ghost/intern/GHOST_ContextGLX.cpp16
-rw-r--r--intern/ghost/intern/GHOST_ContextGLX.h4
2 files changed, 3 insertions, 17 deletions
diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp
index b4a076e4598..ed1c874c236 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.cpp
+++ b/intern/ghost/intern/GHOST_ContextGLX.cpp
@@ -95,11 +95,6 @@ GHOST_TSuccess GHOST_ContextGLX::releaseDrawingContext()
return ::glXMakeCurrent(m_display, None, nullptr) ? GHOST_kSuccess : GHOST_kFailure;
}
-void GHOST_ContextGLX::initContextGLXEW()
-{
- initContextGLEW();
-}
-
GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
{
GHOST_X11_ERROR_HANDLERS_OVERRIDE(handler_store);
@@ -278,18 +273,11 @@ GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
glXMakeCurrent(m_display, m_window, m_context);
- /* Seems that this has to be called after #glXMakeCurrent,
- * which means we cannot use `glX` extensions until after we create a context. */
- initContextGLXEW();
-
if (m_window) {
initClearGL();
::glXSwapBuffers(m_display, m_window);
}
- /* re initialize to get the extensions properly */
- initContextGLXEW();
-
version = glGetString(GL_VERSION);
if (!version || version[0] < '3' || ((version[0] == '3') && (version[2] < '3'))) {
@@ -318,7 +306,7 @@ GHOST_TSuccess GHOST_ContextGLX::releaseNativeHandles()
GHOST_TSuccess GHOST_ContextGLX::setSwapInterval(int interval)
{
- if (!GLXEW_EXT_swap_control) {
+ if (!epoxy_has_glx_extension(m_display, DefaultScreen(m_display), "GLX_EXT_swap_control")) {
::glXSwapIntervalEXT(m_display, m_window, interval);
return GHOST_kSuccess;
}
@@ -327,7 +315,7 @@ GHOST_TSuccess GHOST_ContextGLX::setSwapInterval(int interval)
GHOST_TSuccess GHOST_ContextGLX::getSwapInterval(int &intervalOut)
{
- if (GLXEW_EXT_swap_control) {
+ if (epoxy_has_glx_extension(m_display, DefaultScreen(m_display), "GLX_EXT_swap_control")) {
unsigned int interval = 0;
::glXQueryDrawable(m_display, m_window, GLX_SWAP_INTERVAL_EXT, &interval);
diff --git a/intern/ghost/intern/GHOST_ContextGLX.h b/intern/ghost/intern/GHOST_ContextGLX.h
index c6184bbd3da..d526e6b1b32 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.h
+++ b/intern/ghost/intern/GHOST_ContextGLX.h
@@ -9,7 +9,7 @@
#include "GHOST_Context.h"
-#include <GL/glxew.h>
+#include <epoxy/glx.h>
#ifndef GHOST_OPENGL_GLX_CONTEXT_FLAGS
/* leave as convenience define for the future */
@@ -89,8 +89,6 @@ class GHOST_ContextGLX : public GHOST_Context {
GHOST_TSuccess getSwapInterval(int &intervalOut);
private:
- void initContextGLXEW();
-
Display *m_display;
GLXFBConfig m_fbconfig;
Window m_window;