thirdparty: add NDEBUG check before glGetErrorCode if-statement in sokol_gfx.h (#24754)

This commit is contained in:
Isaiah 2025-06-19 03:23:37 -04:00 committed by GitHub
parent d32969ed3e
commit 125c899d62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4878,7 +4878,11 @@ inline int sg_append_buffer(sg_buffer buf_id, const sg_range& data) { return sg_
#endif
#ifndef _SG_GL_CHECK_ERROR
// __v_ start
#ifdef NDEBUG
#define _SG_GL_CHECK_ERROR() (void)(0)
#else
#define _SG_GL_CHECK_ERROR() { int glerr = glGetError(); if(glerr){ fprintf(stderr, ">> glGetError: %d\n", glerr); }; SOKOL_ASSERT(glerr == GL_NO_ERROR); }
#endif
// __v_ end
#endif
#endif