diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-06-09 10:28:50 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-06-09 10:28:50 -0400 |
commit | 2b909e1729a5913098dcb67c46404a9ab93221e2 (patch) | |
tree | ca25b5e3922c95d2239e0efe169919e1282ac3e6 /include/render | |
parent | 63c3faa006dd477faba635eb5c9962077058ffb3 (diff) |
Add error "handling" to gles3 backend
Diffstat (limited to 'include/render')
-rw-r--r-- | include/render/gles3.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/render/gles3.h b/include/render/gles3.h index 91b738a6..5efb197e 100644 --- a/include/render/gles3.h +++ b/include/render/gles3.h @@ -1,6 +1,8 @@ #ifndef _WLR_RENDER_GLES2_INTERNAL_H #define _WLR_RENDER_GLES2_INTERNAL_H #include <stdint.h> +#include <string.h> +#include <stdbool.h> #include <GLES3/gl3.h> #include <wlr/render.h> @@ -15,4 +17,10 @@ extern const GLchar vertex_src[]; extern const GLchar fragment_src_RGB[]; extern const GLchar fragment_src_RGBA[]; +bool _gles3_flush_errors(const char *file, int line); +#define gles3_flush_errors(...) \ + _gles3_flush_errors(__FILE__ + strlen(WLR_SRC_DIR) + 1, __LINE__) + +#define GL_CALL(func) func; gles3_flush_errors() + #endif |