mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
Added tech ENABLE_OPENGL_ERROR_LOGGING -> log opengl errors when SLIC3R_LOGLEVEL=5
This commit is contained in:
parent
6f4d24ab95
commit
ad7e7ae1cd
3 changed files with 37 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue