diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub index a6f9b58ea98..4d66a9f9f17 100644 --- a/drivers/gl_context/SCsub +++ b/drivers/gl_context/SCsub @@ -3,28 +3,18 @@ Import('env') if (env["platform"] in ["haiku", "osx", "windows", "x11"]): - # FIXME: Dead code, now using GLAD - """ # Thirdparty source files - if (env['builtin_glew'] != 'no'): # builtin + thirdparty_dir = "#thirdparty/glad/" + thirdparty_sources = [ + "glad.c", + ] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - thirdparty_dir = "#thirdparty/glew/" - thirdparty_sources = [ - "glew.c", - ] - thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + env.add_source_files(env.drivers_sources, thirdparty_sources) + env.Append(CPPPATH=[thirdparty_dir]) - env.add_source_files(env.drivers_sources, thirdparty_sources) - env.Append(CPPFLAGS=['-DGLEW_STATIC']) - env.Append(CPPPATH=[thirdparty_dir]) - - env.Append(CPPFLAGS=['-DGLEW_ENABLED']) - """ - - env.add_source_files(env.drivers_sources,"glad.c") - env.Append(CPPFLAGS = ['-DGLAD_ENABLED']) - env.Append(CPPFLAGS = ['-DGLES_OVER_GL']) - env.Append(CPPPATH = ['.']) + env.Append(CPPFLAGS=['-DGLAD_ENABLED']) + env.Append(CPPFLAGS=['-DGLES_OVER_GL']) # Godot source files env.add_source_files(env.drivers_sources, "*.cpp") diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h index e661b3da73d..834d0141a30 100644 --- a/platform/osx/platform_config.h +++ b/platform/osx/platform_config.h @@ -28,7 +28,5 @@ /*************************************************************************/ #include -//#define GLES2_INCLUDE_H "GL/glew.h" -//#define GLES3_INCLUDE_H "GL/glew.h" -#define GLES3_INCLUDE_H "gl_context/glad/glad.h" +#define GLES3_INCLUDE_H "glad/glad.h" #define PTHREAD_RENAME_SELF diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h index 19885c4afb9..0e167531560 100644 --- a/platform/windows/platform_config.h +++ b/platform/windows/platform_config.h @@ -30,5 +30,4 @@ //#else //#include //#endif -//#define GLES2_INCLUDE_H "GL/glew.h" -#define GLES3_INCLUDE_H "gl_context/glad/glad.h" +#define GLES3_INCLUDE_H "glad/glad.h" diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h index 74d507f5a2e..342270b74ad 100644 --- a/platform/x11/platform_config.h +++ b/platform/x11/platform_config.h @@ -34,6 +34,4 @@ #define PTHREAD_BSD_SET_NAME #endif -#define GLES2_INCLUDE_H "GL/glew.h" -//#define GLES3_INCLUDE_H "GL/glew.h" -#define GLES3_INCLUDE_H "gl_context/glad/glad.h" +#define GLES3_INCLUDE_H "glad/glad.h" diff --git a/drivers/gl_context/KHR/khrplatform.h b/thirdparty/glad/KHR/khrplatform.h similarity index 100% rename from drivers/gl_context/KHR/khrplatform.h rename to thirdparty/glad/KHR/khrplatform.h diff --git a/drivers/gl_context/glad.c b/thirdparty/glad/glad.c similarity index 100% rename from drivers/gl_context/glad.c rename to thirdparty/glad/glad.c diff --git a/drivers/gl_context/glad/glad.h b/thirdparty/glad/glad/glad.h similarity index 99% rename from drivers/gl_context/glad/glad.h rename to thirdparty/glad/glad/glad.h index 3653abe71ac..6daba88d62b 100644 --- a/drivers/gl_context/glad/glad.h +++ b/thirdparty/glad/glad/glad.h @@ -85,7 +85,7 @@ GLAPI int gladLoadGL(void); GLAPI int gladLoadGLLoader(GLADloadproc); #include -#include +#include #ifndef GLEXT_64_TYPES_DEFINED /* This code block is duplicated in glxext.h, so must be protected */ #define GLEXT_64_TYPES_DEFINED