mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-27 15:29:41 -07:00
Added tech ENABLE_OPENGL_ERROR_LOGGING -> log opengl errors when SLIC3R_LOGLEVEL=5
This commit is contained in:
@@ -10,6 +10,12 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
#if ENABLE_OPENGL_ERROR_LOGGING
|
||||
extern void glAssertRecentCallImpl(const char* file_name, unsigned int line, const char* function_name);
|
||||
inline void glAssertRecentCall() { glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); }
|
||||
#define glsafe(cmd) do { cmd; glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); } while (false)
|
||||
#define glcheck() do { glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); } while (false)
|
||||
#else
|
||||
#ifndef NDEBUG
|
||||
#define HAS_GLSAFE
|
||||
#endif
|
||||
@@ -24,6 +30,7 @@ inline void glAssertRecentCall() { }
|
||||
#define glsafe(cmd) cmd
|
||||
#define glcheck()
|
||||
#endif
|
||||
#endif // ENABLE_OPENGL_ERROR_LOGGING
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
Reference in New Issue
Block a user