mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-02 16:59:48 +02: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