]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/gl.h
Rearrange soucre files into subdirectories
[libs/gl.git] / source / core / gl.h
diff --git a/source/core/gl.h b/source/core/gl.h
new file mode 100644 (file)
index 0000000..f27b63f
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef MSP_GL_GL_H_
+#define MSP_GL_GL_H_
+
+#ifdef __APPLE__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wkeyword-macro"
+#define extern extern __attribute__((weak_import))
+#include <OpenGL/gl.h>
+#include <OpenGL/glext.h>
+#undef extern
+#pragma clang diagnostic pop
+#elif defined(__ANDROID__)
+#include <GLES3/gl3.h>
+#include <GLES3/gl3ext.h>
+typedef double GLdouble;
+typedef long long GLint64;
+#else
+#ifdef _WIN32
+#ifndef WINAPI
+#if defined(_ARM_)
+#define WINAPI
+#else
+#define WINAPI __stdcall
+#endif
+#endif
+#ifndef APIENTRY
+#define APIENTRY WINAPI
+#endif
+#ifndef DECLSPEC_IMPORT
+#define DECLSPEC_IMPORT __declspec(dllimport)
+#endif
+#ifndef WINGDIAPI
+#define WINGDIAPI DECLSPEC_IMPORT
+#endif
+#endif
+#include <GL/gl.h>
+#include <GL/glext.h>
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+
+#endif