#pragma once #ifdef KINC_WINDOWS #include #include #endif #ifdef KINC_MACOS #include #include #endif #ifdef KINC_IOS #import #import #import #endif #ifdef KINC_ANDROID #include #if KINC_ANDROID_API >= 18 #include #endif #include #include #endif #ifdef KINC_EMSCRIPTEN #define GL_GLEXT_PROTOTYPES #define EGL_EGLEXT_PROTOTYPES #include #endif #ifdef KINC_LINUX #include #include #define GL_GLEXT_PROTOTYPES #include #include #include #endif #ifdef KINC_RASPBERRY_PI // #define GL_GLEXT_PROTOTYPES #include "EGL/egl.h" #include "EGL/eglext.h" #include "GLES2/gl2.h" #endif #include #if defined(NDEBUG) || defined(KINC_OSX) || defined(KINC_IOS) || defined(KINC_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__); \ } \ }