#pragma once #ifdef DEBUG #include #include #define glCheckErrors() \ do \ { \ GLenum err; \ while ((err = glGetError()) != GL_NO_ERROR) \ { \ fprintf (stderr, "%s:%d: %s\n", __FILE__, __LINE__, glewGetErrorString(err)); \ } \ } while (0) #else #define glCheckErrors() #endif