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:
authorClément Foucault <foucault.clem@gmail.com>2020-09-01 00:13:35 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-01 01:30:36 +0300
commit9d932b426f0db9350a3fe49cd5bcf8b25e7cf8bb (patch)
tree000cf7fba17c21bd28eac5e0190a5531b0640c89 /source/blender/gpu/opengl/gl_debug.hh
parent82a197cc7f74be2e8f4fbe2d40fc2aec100c4276 (diff)
GL: Move MacOS debug callback to gl_debug.cc
And format to use the same callback as standard debugging layer.
Diffstat (limited to 'source/blender/gpu/opengl/gl_debug.hh')
-rw-r--r--source/blender/gpu/opengl/gl_debug.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_debug.hh b/source/blender/gpu/opengl/gl_debug.hh
index 44cd98b72f3..47c9558f13a 100644
--- a/source/blender/gpu/opengl/gl_debug.hh
+++ b/source/blender/gpu/opengl/gl_debug.hh
@@ -24,6 +24,14 @@ namespace blender {
namespace gpu {
namespace debug {
+/* Enabled on MacOS by default since there is no support for debug callbacks. */
+#if defined(DEBUG) && defined(__APPLE__)
+# define GL_CHECK_ERROR(info) debug::check_gl_error(info)
+#else
+# define GL_CHECK_ERROR(info)
+#endif
+
+void check_gl_error(const char *info);
void init_gl_callbacks(void);
} // namespace debug