summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2018-02-19 18:24:04 +0200
committerTobrun <tobrun@mapbox.com>2018-03-01 11:46:04 +0100
commitb00e92fa94bd2e23cf31e4244c1a9db9c7a462ea (patch)
tree74aa31b897d5dd549cd09a8826b58c887ca61c8e /src
parent54c3fcdec86a46649fa22af169d88fc377554157 (diff)
downloadqtlocation-mapboxgl-b00e92fa94bd2e23cf31e4244c1a9db9c7a462ea.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.