#pragma once #ifdef KORE_WINDOWS #include #include #endif #ifdef KORE_MACOS #include #include #endif #ifdef KORE_IOS #import #import #import #endif #ifdef KORE_ANDROID #include #if KORE_ANDROID_API >= 18 #include #endif #include #include #endif #ifdef KORE_EMSCRIPTEN #define GL_GLEXT_PROTOTYPES #define EGL_EGLEXT_PROTOTYPES #include #endif #ifdef KORE_LINUX #include #include #define GL_GLEXT_PROTOTYPES #include #include #include #endif #ifdef KORE_PI // #define GL_GLEXT_PROTOTYPES #include "EGL/egl.h" #include "EGL/eglext.h" #include "GLES2/gl2.h" #endif #ifdef KORE_TIZEN #include #endif #include #if defined(NDEBUG) || defined(KORE_OSX) || defined(KORE_IOS) || defined(KORE_ANDROID) || 1 // Calling glGetError too early means trouble #define glCheckErrors() \ {} #else #define glCheckErrors() \ { \ GLenum code = glGetError(); \ while (code != GL_NO_ERROR) { \ Kore::log(Kore::Error, "GL Error %d %s %d\n", code, __FILE__, __LINE__); \ } \ } #endif #define glCheckErrors2() \ { \ GLenum code = glGetError(); \ while (code != GL_NO_ERROR) { \ Kore::log(Kore::Error, "GL Error %d %s %d\n", code, __FILE__, __LINE__); \ } \ }