1 /** 2 * @file lv_opengles_debug.h 3 * 4 */ 5 6 #ifndef LV_OPENGLES_DEBUG_H 7 #define LV_OPENGLES_DEBUG_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 #include "../../lv_conf_internal.h" 14 #if LV_USE_OPENGLES 15 16 #include <stdbool.h> 17 #include <GL/glew.h> 18 #include <GLFW/glfw3.h> 19 20 void GLClearError(void); 21 22 void GLLogCall(const char * function, const char * file, int line); 23 24 #if LV_USE_OPENGLES_DEBUG 25 #define GL_CALL(x) do {\ 26 GLClearError();\ 27 x;\ 28 GLLogCall(#x, __FILE__, __LINE__);\ 29 } while(0) 30 #else 31 #define GL_CALL(x) x 32 #endif 33 34 #endif /* LV_USE_OPENGLES */ 35 36 #ifdef __cplusplus 37 } /* extern "C" */ 38 #endif 39 40 #endif /* LV_OPENGLES_DEBUG_H */ 41