mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
glsafe macro to test for the glGetError in debug mode
This commit is contained in:
parent
3c78d35e3c
commit
f1470966a5
2 changed files with 172 additions and 138 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue