diff options
Diffstat (limited to 'src/mbgl/platform/gl_functions.cpp')
-rw-r--r-- | src/mbgl/platform/gl_functions.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mbgl/platform/gl_functions.cpp b/src/mbgl/platform/gl_functions.cpp new file mode 100644 index 0000000000..6eb7790ca2 --- /dev/null +++ b/src/mbgl/platform/gl_functions.cpp @@ -0,0 +1,17 @@ +#include <mbgl/platform/gl_functions.hpp> + +#include <mbgl/util/logging.hpp> + +namespace mbgl { +namespace platform { + +#ifndef NDEBUG +void glCheckError(const char* cmd, const char* file, int line) { + if (GLenum err = glGetError()) { + Log::Warning(Event::OpenGL, "Error %d: %s - %s:%d", err, cmd, file, line); + } +} +#endif + +} // namespace platform +} // namespace mbgl |