summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2018-02-19 18:24:04 +0200
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2018-03-01 12:21:32 +0100
commitfdd9890461b417385e68db0453ec9fff5368f7b3 (patch)
tree056e10bd01af7d0af9c91964603efae71546f3f6 /src
parent636cf4588a885954b60608e3baa1f97042f54263 (diff)
downloadqtlocation-mapboxgl-fdd9890461b417385e68db0453ec9fff5368f7b3.tar.gz
[core] check opengl error state after custom layer invocations
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/layers/render_custom_layer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mbgl/renderer/layers/render_custom_layer.cpp b/src/mbgl/renderer/layers/render_custom_layer.cpp
index adafd8583f..a429b8d82e 100644
--- a/src/mbgl/renderer/layers/render_custom_layer.cpp
+++ b/src/mbgl/renderer/layers/render_custom_layer.cpp
@@ -5,6 +5,7 @@
#include <mbgl/renderer/bucket.hpp>
#include <mbgl/style/layers/custom_layer_impl.hpp>
#include <mbgl/map/transform_state.hpp>
+#include <mbgl/gl/gl.hpp>
namespace mbgl {
@@ -46,11 +47,11 @@ void RenderCustomLayer::render(PaintParameters& paintParameters, RenderSource*)
if (context != impl().context || !initialized) {
//If the context changed, deinitialize the previous one before initializing the new one.
if (context && !contextDestroyed && impl().deinitializeFn) {
- impl().deinitializeFn(context);
+ MBGL_CHECK_ERROR(impl().deinitializeFn(context));
}
context = impl().context;
assert(impl().initializeFn);
- impl().initializeFn(impl().context);
+ MBGL_CHECK_ERROR(impl().initializeFn(impl().context));
initialized = true;
}
@@ -75,7 +76,7 @@ void RenderCustomLayer::render(PaintParameters& paintParameters, RenderSource*)
parameters.fieldOfView = state.getFieldOfView();
assert(impl().renderFn);
- impl().renderFn(context, parameters);
+ MBGL_CHECK_ERROR(impl().renderFn(context, parameters));
// Reset the view back to our original one, just in case the CustomLayer changed
// the viewport or Framebuffer.