Compilation fix GLAD with version Glad 2

Re-generated GLAD library with Version 2 from https://gen.glad.sh/
Integrated into CMake and RenderingManager loader.
This commit is contained in:
Bruno Herbelin
2024-08-24 22:38:17 +02:00
parent 21ad2cab07
commit 23685253a8
5 changed files with 22983 additions and 25710 deletions

View File

@@ -343,7 +343,8 @@ include_directories(
${GLAD_INCLUDE_DIRS}
)
add_library(GLAD "${CMAKE_CURRENT_SOURCE_DIR}/ext/glad/src/glad.c")
message(STATUS "Including 'GLAD' Open source multi-language OpenGL loader https://glad.dav1d.de -- ${GLAD_INCLUDE_DIRS}")
set_property(TARGET GLAD PROPERTY C_STANDARD 11)
message(STATUS "Compiling 'GLAD 2' Open source multi-language OpenGL loader https://gen.glad.sh -- ${GLAD_INCLUDE_DIRS}")
#
# DEAR IMGUI

1
ext/glad/include/glad/gl.h Symbolic link
View File

@@ -0,0 +1 @@
glad.h

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1022,7 +1022,7 @@ bool RenderingWindow::init(int index, GLFWwindow *share)
// Initialize OpenGL loader on first call
static bool glad_initialized = false;
if ( !glad_initialized ) {
bool err = gladLoadGLLoader((GLADloadproc) glfwGetProcAddress) == 0;
bool err = gladLoadGL((GLADloadfunc) glfwGetProcAddress) == 0;
if (err) {
Log::Error("Failed to initialize GLAD OpenGL loader.");
return false;