Skip to content

Commit

Permalink
linux: use egl with x11 instead of glx
Browse files Browse the repository at this point in the history
  • Loading branch information
scribam committed Dec 10, 2023
1 parent 0433fd8 commit 81aee20
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 1,230 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1146,9 +1146,7 @@ if(USE_OPENGL)
core/wsi/sdl.cpp
core/wsi/sdl.h
core/wsi/wgl.cpp
core/wsi/wgl.h
core/wsi/xgl.cpp
core/wsi/xgl.h)
core/wsi/wgl.h)

target_sources(${PROJECT_NAME} PRIVATE
core/rend/gles/glcache.h
Expand Down Expand Up @@ -1472,10 +1470,8 @@ endif()
if((USE_OPENGL OR USE_GLES2 OR USE_GLES) AND NOT LIBRETRO)
add_library(glad STATIC core/deps/glad/src/gl.c)
if(NOT SDL2_FOUND)
if(X11_FOUND)
target_sources(glad PRIVATE core/deps/glad/src/glx.c)
endif()
if(ANDROID OR USE_GLES2 OR USE_GLES)
if(NOT APPLE AND NOT WIN32)
# When SDL2 is not found, we can use EGL with ANativeWindow (Android), DispmanX (Raspberry Pi) or X11
target_sources(glad PRIVATE core/deps/glad/src/egl.c)
endif()
if(WIN32)
Expand Down
Loading

0 comments on commit 81aee20

Please sign in to comment.