diff options
| author | allusive-dev <[email protected]> | 2023-11-16 11:40:42 +1100 |
|---|---|---|
| committer | allusive-dev <[email protected]> | 2023-11-16 11:40:42 +1100 |
| commit | d89ff3e14012620969243a6f51f8f6a62f2c299c (patch) | |
| tree | 4552630142c1c8cccbeeb00b46559d832c43feb9 /src/backend | |
| parent | media and icons (diff) | |
| download | compfy-d89ff3e14012620969243a6f51f8f6a62f2c299c.tar.xz compfy-d89ff3e14012620969243a6f51f8f6a62f2c299c.zip | |
restore glx errors except for 'GL_INVALID_FRAMEBUFFER_OPERATION'
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/gl/gl_common.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/backend/gl/gl_common.h b/src/backend/gl/gl_common.h index a476119..63805bb 100644 --- a/src/backend/gl/gl_common.h +++ b/src/backend/gl/gl_common.h @@ -221,20 +221,19 @@ static inline const char *gl_get_err_str(GLenum err) { // const char *func, int line -static inline void gl_check_err_() { +static inline void gl_check_err_(const char *func, int line) { GLenum err = GL_NO_ERROR; - // while (GL_NO_ERROR != (err = glGetError())) { - // const char *errtext = gl_get_err_str(err); - - // if (errtext) { - // log_printf(tls_logger, LOG_LEVEL_ERROR, func, - // "GLX error at line %d: %s", line, errtext); - // } else { - // log_printf(tls_logger, LOG_LEVEL_ERROR, func, - // "GLX error at line %d: %d", line, err); - // } - // } + while (GL_NO_ERROR != (err = glGetError())) { + const char *errtext = gl_get_err_str(err); + if (errtext) { + log_printf(tls_logger, LOG_LEVEL_ERROR, func, + "GL error at line %d: %s", line, errtext); + } else if (err != 1286) { + log_printf(tls_logger, LOG_LEVEL_ERROR, func, + "GL error at line %d: %d", line, err); + } + } } static inline void gl_clear_err(void) { |