floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.63k stars 472 forks source link

Allow overriding the gl error check macro #919

Closed danielchasehooper closed 9 months ago

danielchasehooper commented 9 months ago

Our project had horrible development performance due to all of sokol's glGetError calls (that function is super slow in chromium), this PR allows us to disable sokol's gl error checks, while leaving all of sokols asserts enabled for development. At the end of the frame we assert(glGetError()==0) as a sanity check. if that assert ever gets triggered, we can re-enable sokol's default _SG_GL_CHECK_ERROR definition for debugging

floooh commented 9 months ago

Makes sense, yeah. Thanks!