Added SDL_USE_BUILTIN_OPENGL_DEFINITIONS to avoid system OpenGL headers
diff --git a/include/SDL_egl.h b/include/SDL_egl.h
index 62bc0b4..d00b26f 100644
--- a/include/SDL_egl.h
+++ b/include/SDL_egl.h
@@ -24,7 +24,7 @@
*
* This is a simple file to encapsulate the EGL API headers.
*/
-#if !defined(_MSC_VER) && !defined(__ANDROID__)
+#if !defined(_MSC_VER) && !defined(__ANDROID__) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
#if defined(__vita__) || defined(__psp2__)
#include <psp2/types.h>
@@ -1676,5 +1676,4 @@ EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
#endif /* __eglext_h_ */
-
#endif /* _MSC_VER */
diff --git a/include/SDL_opengles2.h b/include/SDL_opengles2.h
index ce114ae..876e965 100644
--- a/include/SDL_opengles2.h
+++ b/include/SDL_opengles2.h
@@ -26,7 +26,7 @@
*/
#include "SDL_config.h"
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)
#ifdef __IPHONEOS__
#include <OpenGLES/ES2/gl.h>