- Implemented EGL Context

This commit is contained in:
2025-07-28 13:00:20 -04:00
parent 8124ea2ae5
commit 7aafa4c9aa
19 changed files with 385 additions and 49 deletions

View File

@@ -37,6 +37,7 @@ macro(fennec_check_platform)
include("${FENNEC_SOURCE_DIR}/cmake/wayland.cmake")
fennec_check_wayland()
fennec_init_graphics()
endif()
endmacro()

View File

@@ -16,7 +16,12 @@
# 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)
message(STATUS "EGL Requested")
else()
find_package(OpenGL)
endif()
if(TARGET OpenGL::GL) # Core OpenGL Desktop Profile
list(APPEND FENNEC_LINK_LIBRARIES OpenGL::OpenGL)
@@ -42,5 +47,6 @@ if(FENNEC_GRAPHICS_WANT_EGL)
list(APPEND FENNEC_LINK_LIBRARIES OpenGL::EGL)
list(APPEND FENNEC_COMPILE_DEFINITIONS FENNEC_GRAPHICS_EGL=1)
list(APPEND FENNEC_EXTRA_SOURCES
include/fennec/platform/opengl/egl/context.h source/platform/opengl/egl/context.cpp
)
endif()

View File

@@ -22,13 +22,13 @@ message(STATUS "OS: ${CMAKE_SYSTEM_NAME}")
include("${FENNEC_SOURCE_DIR}/cmake/default_user.cmake")
# Graphics APIs
macro(fennec_init_graphics)
include("${FENNEC_SOURCE_DIR}/cmake/opengl.cmake")
endmacro()
# Check for Linux
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(FENNEC_PLATFORM "Linux")
include("${FENNEC_SOURCE_DIR}/cmake/linux.cmake")
endif ()
# Graphics APIs
if(FENNEC_USER_CLIENT)
include("${FENNEC_SOURCE_DIR}/cmake/opengl.cmake")
endif()
endif ()