Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/gawain/gawain/common.h')
-rw-r--r--intern/gawain/gawain/common.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/intern/gawain/gawain/common.h b/intern/gawain/gawain/common.h
new file mode 100644
index 00000000000..b734da41681
--- /dev/null
+++ b/intern/gawain/gawain/common.h
@@ -0,0 +1,36 @@
+
+// Gawain common #defines and #includes
+//
+// This code is part of the Gawain library, with modifications
+// specific to integration with Blender.
+//
+// Copyright 2016 Mike Erwin
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
+// the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+#pragma once
+
+#define TRUST_NO_ONE !defined(NDEBUG)
+// strict error checking, enabled for debug builds during early development
+
+#include <GL/glew.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#if TRUST_NO_ONE
+ #include <assert.h>
+#endif
+
+#define APPLE_LEGACY (defined(__APPLE__) && defined(WITH_GL_PROFILE_COMPAT))
+
+#if APPLE_LEGACY
+ #undef glGenVertexArrays
+ #define glGenVertexArrays glGenVertexArraysAPPLE
+
+ #undef glDeleteVertexArrays
+ #define glDeleteVertexArrays glDeleteVertexArraysAPPLE
+
+ #undef glBindVertexArray
+ #define glBindVertexArray glBindVertexArrayAPPLE
+#endif