- Started implementing OpenGL wrappers

This commit is contained in:
2025-08-02 20:59:56 -04:00
parent 3d42dea9eb
commit 5e04eb0ca6
7 changed files with 454 additions and 9 deletions

View File

@@ -18,13 +18,14 @@
if(FENNEC_GRAPHICS_WANT_EGL)
find_package(OpenGL REQUIRED COMPONENTS EGL)
find_package(GLEW REQUIRED)
message(STATUS "EGL Requested")
else()
find_package(OpenGL)
endif()
if(TARGET OpenGL::GL)
list(APPEND FENNEC_LINK_LIBRARIES OpenGL::GL)
if(TARGET OpenGL::GL AND TARGET GLEW::GLEW)
list(APPEND FENNEC_LINK_LIBRARIES OpenGL::GL GLEW::GLEW)
list(APPEND FENNEC_COMPILE_DEFINITIONS FENNEC_GRAPHICS_OPENGL=1)
else()
message(FATAL_ERROR "No Suitable OpenGL implementation found.")
@@ -38,9 +39,13 @@ 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
include/fennec/renderers/opengl/lib/fwd.h
include/fennec/renderers/opengl/lib/enum.h
include/fennec/renderers/opengl/lib/buffer.h
include/fennec/renderers/opengl/modern.h
include/fennec/renderers/opengl/fallback.h
include/fennec/platform/opengl/egl/context.h source/platform/opengl/egl/context.cpp
)
endif()