Add error "handling" to gles3 backend

This commit is contained in:
Drew DeVault 2017-06-09 10:28:50 -04:00
parent 63c3faa006
commit 2b909e1729
5 changed files with 87 additions and 43 deletions

View file

@ -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