summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-12-10 13:46:26 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-12-10 13:46:26 +0100
commit4ad28c931aaf930afd7dace5805578acc4915e1f (patch)
treea7e897030647057d37be01f6ade37e3d7e8ea8b4 /include
parent93d56294cf6f7af39679a871f51087be34f813a2 (diff)
downloadqtlocation-mapboxgl-4ad28c931aaf930afd7dace5805578acc4915e1f.tar.gz
only report STACK_OVERFLOW/STACK_UNDERFLOW when the GL implementation has them
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/platform/gl.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/platform/gl.hpp b/include/mbgl/platform/gl.hpp
index b639094461..e2b6d304bd 100644
--- a/include/mbgl/platform/gl.hpp
+++ b/include/mbgl/platform/gl.hpp
@@ -2,6 +2,7 @@
#define MBGL_RENDERER_GL
#include <string>
+#include <stdexcept>
#if __APPLE__
#include "TargetConditionals.h"
@@ -29,6 +30,12 @@
namespace mbgl {
namespace gl {
+struct Error : ::std::runtime_error {
+ inline Error(GLenum err, const std::string &msg) : ::std::runtime_error(msg), code(err) {};
+ const GLenum code;
+};
+
+
// GL_KHR_debug / GL_ARB_debug_output
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243