summaryrefslogtreecommitdiffstats
path: root/xbmc/system_gl.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/system_gl.h')
-rw-r--r--xbmc/system_gl.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/xbmc/system_gl.h b/xbmc/system_gl.h
new file mode 100644
index 0000000..04c4d55
--- /dev/null
+++ b/xbmc/system_gl.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2005-2018 Team Kodi
+ * This file is part of Kodi - https://kodi.tv
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * See LICENSES/README.md for more information.
+ */
+
+#pragma once
+
+#ifdef HAS_GL
+// always define GL_GLEXT_PROTOTYPES before include gl headers
+#if !defined(GL_GLEXT_PROTOTYPES)
+#define GL_GLEXT_PROTOTYPES
+#endif
+#if defined(TARGET_LINUX)
+#include <GL/gl.h>
+#include <GL/glext.h>
+#elif defined(TARGET_FREEBSD)
+#include <GL/gl.h>
+#elif defined(TARGET_DARWIN)
+#include <OpenGL/gl.h>
+#include <OpenGL/gl3.h>
+#include <OpenGL/gl3ext.h>
+#endif
+#elif HAS_GLES >= 2
+#if defined(TARGET_DARWIN)
+#include <OpenGLES/ES2/gl.h>
+#include <OpenGLES/ES2/glext.h>
+#else
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+#endif
+#if HAS_GLES == 3
+#include <GLES3/gl3.h>
+#endif
+#endif