diff -r 9f7bfc0a1dc3 -r 84a546e282b7 src/error.c --- a/src/error.c Fri Apr 18 19:34:31 2025 +0200 +++ b/src/error.c Fri Apr 18 20:13:01 2025 +0200 @@ -103,4 +103,14 @@ cxmutstr msg = cx_strcat(3, message, CX_STR(" GL Error: "), cx_str(glerr)); asc_error_cxstr(cx_strcast(msg)); cx_strfree(&msg); -} \ No newline at end of file +} + +int asc_error_catch_all_gl(void) { + GLenum error; + int ret = 0; + while ((error = glGetError()) != GL_NO_ERROR) { + asc_error_gl(error, CX_STR("Uncaught")); + ret = 1; + } + return ret; +}