From dc0d08cc9379abc190788fb494b798074b64134c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 6 Jan 2017 22:41:51 +0100 Subject: [PATCH] Move glad files to thirdparty dir --- drivers/gl_context/SCsub | 28 ++++++------------- platform/osx/platform_config.h | 4 +-- platform/windows/platform_config.h | 3 +- platform/x11/platform_config.h | 4 +-- .../glad}/KHR/khrplatform.h | 0 .../gl_context => thirdparty/glad}/glad.c | 0 .../glad}/glad/glad.h | 2 +- 7 files changed, 13 insertions(+), 28 deletions(-) rename {drivers/gl_context => thirdparty/glad}/KHR/khrplatform.h (100%) rename {drivers/gl_context => thirdparty/glad}/glad.c (100%) rename {drivers/gl_context => thirdparty/glad}/glad/glad.h (99%) diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub index a6f9b58ea9..4d66a9f9f1 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 e661b3da73..834d0141a3 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 19885c4afb..0e16753156 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 74d507f5a2..342270b74a 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 3653abe71a..6daba88d62 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