mirror of
https://github.com/vlang/v.git
synced 2025-09-13 06:22:26 +03:00
thirdparty: add NDEBUG check before glGetErrorCode if-statement in sokol_gfx.h (#24754)
This commit is contained in:
parent
d32969ed3e
commit
125c899d62
1 changed files with 4 additions and 0 deletions
4
thirdparty/sokol/sokol_gfx.h
vendored
4
thirdparty/sokol/sokol_gfx.h
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue