1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-26 10:25:49 +00:00

glsafe macro to test for the glGetError in debug mode

This commit is contained in:
bubnikv
2019-01-31 09:37:27 +01:00
parent 3c78d35e3c
commit f1470966a5
2 changed files with 172 additions and 138 deletions
+13
View File
@@ -11,6 +11,19 @@
#include <functional>
#ifndef NDEBUG
#define HAS_GLSAFE
#endif
#ifdef HAS_GLSAFE
extern void glAssertRecentCallImpl();
inline void glAssertRecentCall() { glAssertRecentCallImpl(); }
#define glsafe(cmd) do { cmd; glAssertRecentCallImpl(); } while (false)
#else
inline void glAssertRecentCall() { }
#define glsafe(cmd) cmd
#endif
namespace Slic3r {
class Print;