- Setup EGL context for Wayland. Test window now opens as black rectangle.

This commit is contained in:
2025-12-15 13:20:08 -05:00
parent 5dcb58f53c
commit 1acf00138a
36 changed files with 992 additions and 80 deletions

View File

@@ -16,19 +16,31 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# ======================================================================================================================
find_package(OpenGL)
if(FENNEC_GRAPHICS_WANT_EGL)
find_package(OpenGL REQUIRED COMPONENTS EGL)
find_package(GLEW REQUIRED)
message(STATUS "EGL Requested")
else()
find_package(OpenGL)
find_package(GLEW REQUIRED)
fennec_add_link_libraries(OpenGL::EGL)
fennec_add_sources(
include/fennec/platform/opengl/egl/fwd.h
include/fennec/platform/opengl/egl/context.h source/platform/opengl/egl/context.cpp
include/fennec/platform/opengl/egl/surface.h source/platform/opengl/egl/surface.cpp
)
endif()
find_package(GLEW REQUIRED)
if(TARGET OpenGL::GL AND TARGET GLEW::GLEW)
message(STATUS "Found OpenGL: ${OPENGL_gl_LIBRARY}")
fennec_add_link_libraries(OpenGL::GL GLEW::GLEW)
fennec_add_definitions(FENNEC_GRAPHICS_OPENGL=1)
fennec_add_sources(
include/fennec/renderers/opengl/glcontext.h source/renderers/opengl/glcontext.cpp
)
else()
message(FATAL_ERROR "No Suitable OpenGL implementation found.")
endif()