this file defines SOKOL_ASSERT in a way that cannot be disabled, meaning that even in release mode it is not possible to turn off assertions and reduce calls to e.g. glGetError. Compiling with --passC:-DNDEBUG does not have an effect as it would with C/C++ usage of Sokol.
I would propose wrapping in a similar check to assert.h:
#ifndef NDEBUG
#define SOKOL_ASSERT...
#endif
We may want to also check if the Nim app is compiled in release mode, in which case we can pass -DNDEBUG when compiling sokol_gfx.c
this file defines
SOKOL_ASSERT
in a way that cannot be disabled, meaning that even in release mode it is not possible to turn off assertions and reduce calls to e.g.glGetError
. Compiling with--passC:-DNDEBUG
does not have an effect as it would with C/C++ usage of Sokol.I would propose wrapping in a similar check to
assert.h
:We may want to also check if the Nim app is compiled in release mode, in which case we can pass
-DNDEBUG
when compilingsokol_gfx.c