mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Improved glsafe macro to print out file name, line number and function
name on OpenGL assert.
This commit is contained in:
parent
f65eb9afdb
commit
3987296b62
2 changed files with 5 additions and 5 deletions
|
@ -16,9 +16,9 @@
|
|||
#endif
|
||||
|
||||
#ifdef HAS_GLSAFE
|
||||
extern void glAssertRecentCallImpl();
|
||||
inline void glAssertRecentCall() { glAssertRecentCallImpl(); }
|
||||
#define glsafe(cmd) do { cmd; glAssertRecentCallImpl(); } while (false)
|
||||
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)
|
||||
#else
|
||||
inline void glAssertRecentCall() { }
|
||||
#define glsafe(cmd) cmd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue