mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
thirdparty: print the glGetError() code on failure too in sokol_gfx.h, to make diagnostic easier
This commit is contained in:
parent
080684dda1
commit
37e5ead75d
1 changed files with 3 additions and 1 deletions
4
thirdparty/sokol/sokol_gfx.h
vendored
4
thirdparty/sokol/sokol_gfx.h
vendored
|
@ -4877,7 +4877,9 @@ inline int sg_append_buffer(sg_buffer buf_id, const sg_range& data) { return sg_
|
||||||
#define GL_LUMINANCE 0x1909
|
#define GL_LUMINANCE 0x1909
|
||||||
#endif
|
#endif
|
||||||
#ifndef _SG_GL_CHECK_ERROR
|
#ifndef _SG_GL_CHECK_ERROR
|
||||||
#define _SG_GL_CHECK_ERROR() { SOKOL_ASSERT(glGetError() == GL_NO_ERROR); }
|
// __v_ start
|
||||||
|
#define _SG_GL_CHECK_ERROR() { int glerr = glGetError(); if(glerr){ fprintf(stderr, ">> glGetError: %d\n", glerr); }; SOKOL_ASSERT(glerr == GL_NO_ERROR); }
|
||||||
|
// __v_ end
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue