- Setup Contexts to pull more info from the GPU

- Started outlining OpenGL implementation
This commit is contained in:
2025-07-28 21:06:52 -04:00
parent 7aafa4c9aa
commit 3d4ea4398a
11 changed files with 217 additions and 46 deletions

View File

@@ -23,18 +23,9 @@ else()
find_package(OpenGL)
endif()
if(TARGET OpenGL::GL) # Core OpenGL Desktop Profile
list(APPEND FENNEC_LINK_LIBRARIES OpenGL::OpenGL)
if(TARGET OpenGL::GL)
list(APPEND FENNEC_LINK_LIBRARIES OpenGL::GL)
list(APPEND FENNEC_COMPILE_DEFINITIONS FENNEC_GRAPHICS_OPENGL=1)
elseif(TARGET OpenGL::GLES3) # OpenGL for Embedded Systems 3
list(APPEND FENNEC_LINK_LIBRARIES OpenGL::GLES3)
list(APPEND FENNEC_COMPILE_DEFINITIONS FENNEC_GRAPHICS_GLES3=1)
elseif (TARGET OpenGL::GLES2) # OpenGL for Embedded Systems 2
list(APPEND FENNEC_LINK_LIBRARIES OpenGL::GLES2)
list(APPEND FENNEC_COMPILE_DEFINITIONS FENNEC_GRAPHICS_GLES2=1)
else()
message(FATAL_ERROR "No Suitable OpenGL implementation found.")
endif()
@@ -48,5 +39,9 @@ if(FENNEC_GRAPHICS_WANT_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/modern.h
include/fennec/renderers/opengl/fallback.h
include/fennec/renderers/opengl/legacy.h
)
endif()