mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-05 19:42:47 +00:00
glsafe macro to test for the glGetError in debug mode
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user