diff options
author | Christian Rauch <Rauch.Christian@gmx.de> | 2022-08-15 15:58:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-08-15 17:10:29 +0300 |
commit | a296b8f694d1a93d40da78312758580f69b43be7 (patch) | |
tree | fd5791d3227411c905c7c728f2d97fe19e28156f /intern/cycles/app | |
parent | 90be364ca9b86f6dac78925166ba3ea567fc950d (diff) |
GPU: replace GLEW with libepoxy
With libepoxy we can choose between EGL and GLX at runtime, as well as
dynamically open EGL and GLX libraries without linking to them.
This will make it possible to build with Wayland, EGL, GLVND support while
still running on systems that only have X11, GLX and libGL. It also paves
the way for headless rendering through EGL.
libepoxy is a new library dependency, and is included in the precompiled
libraries. GLEW is no longer a dependency, and WITH_SYSTEM_GLEW was removed.
Includes contributions by Brecht Van Lommel, Ray Molenkamp, Campbell Barton
and Sergey Sharybin.
Ref T76428
Differential Revision: https://developer.blender.org/D15291
Diffstat (limited to 'intern/cycles/app')
-rw-r--r-- | intern/cycles/app/CMakeLists.txt | 4 | ||||
-rw-r--r-- | intern/cycles/app/opengl/display_driver.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/app/opengl/shader.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/app/opengl/window.cpp | 3 |
4 files changed, 5 insertions, 6 deletions
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt index 6aea962eab5..d46ece55256 100644 --- a/intern/cycles/app/CMakeLists.txt +++ b/intern/cycles/app/CMakeLists.txt @@ -44,8 +44,8 @@ endif() if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI) add_definitions(${GL_DEFINITIONS}) - list(APPEND INC_SYS ${GLEW_INCLUDE_DIR} ${SDL2_INCLUDE_DIRS}) - list(APPEND LIB ${CYCLES_GL_LIBRARIES} ${CYCLES_GLEW_LIBRARIES} ${SDL2_LIBRARIES}) + list(APPEND INC_SYS ${Epoxy_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS}) + list(APPEND LIB ${CYCLES_GL_LIBRARIES} ${Epoxy_LIBRARIES} ${SDL2_LIBRARIES}) endif() cycles_external_libraries_append(LIB) diff --git a/intern/cycles/app/opengl/display_driver.cpp b/intern/cycles/app/opengl/display_driver.cpp index 8b99f3b6feb..d9c72c07ae4 100644 --- a/intern/cycles/app/opengl/display_driver.cpp +++ b/intern/cycles/app/opengl/display_driver.cpp @@ -7,8 +7,8 @@ #include "util/log.h" #include "util/string.h" -#include <GL/glew.h> #include <SDL.h> +#include <epoxy/gl.h> CCL_NAMESPACE_BEGIN diff --git a/intern/cycles/app/opengl/shader.cpp b/intern/cycles/app/opengl/shader.cpp index 9db9ea7fce9..4d22fc2b763 100644 --- a/intern/cycles/app/opengl/shader.cpp +++ b/intern/cycles/app/opengl/shader.cpp @@ -6,7 +6,7 @@ #include "util/log.h" #include "util/string.h" -#include <GL/glew.h> +#include <epoxy/gl.h> CCL_NAMESPACE_BEGIN diff --git a/intern/cycles/app/opengl/window.cpp b/intern/cycles/app/opengl/window.cpp index 7351ae3eecd..f3352decd08 100644 --- a/intern/cycles/app/opengl/window.cpp +++ b/intern/cycles/app/opengl/window.cpp @@ -11,8 +11,8 @@ #include "util/time.h" #include "util/version.h" -#include <GL/glew.h> #include <SDL.h> +#include <epoxy/gl.h> CCL_NAMESPACE_BEGIN @@ -294,7 +294,6 @@ void window_main_loop(const char *title, SDL_RaiseWindow(V.window); V.gl_context = SDL_GL_CreateContext(V.window); - glewInit(); SDL_GL_MakeCurrent(V.window, nullptr); window_reshape(width, height); |