diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-05-04 01:31:43 +0200 |
---|---|---|
committer | Lauren Budorick <lauren@mapbox.com> | 2018-05-03 16:31:43 -0700 |
commit | c3346f473ac7e3d49219c8dbc381d92f8fe3f017 (patch) | |
tree | 7e7d1c1569c849192209b0c5f5a58ef7736896a1 /src/mbgl/renderer/render_layer.hpp | |
parent | f6da3ba9be27ff9b279730603c517c4cb5e57007 (diff) | |
download | qtlocation-mapboxgl-c3346f473ac7e3d49219c8dbc381d92f8fe3f017.tar.gz |
[core] Don't crash when attribute count is exceeded
Diffstat (limited to 'src/mbgl/renderer/render_layer.hpp')
-rw-r--r-- | src/mbgl/renderer/render_layer.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mbgl/renderer/render_layer.hpp b/src/mbgl/renderer/render_layer.hpp index 55831cb72c..5b92ffa4db 100644 --- a/src/mbgl/renderer/render_layer.hpp +++ b/src/mbgl/renderer/render_layer.hpp @@ -82,6 +82,11 @@ public: friend std::string layoutKey(const RenderLayer&); protected: + // Checks whether the current hardware can render this layer. If it can't, we'll show a warning + // in the console to inform the developer. + void checkRenderability(const PaintParameters&, uint32_t activeBindingCount); + +protected: // renderTiles are exposed directly to CrossTileSymbolIndex and Placement so they // can update opacities in the symbol buckets immediately before rendering friend class CrossTileSymbolIndex; @@ -92,6 +97,12 @@ protected: // Stores what render passes this layer is currently enabled for. This depends on the // evaluated StyleProperties object and is updated accordingly. RenderPass passes = RenderPass::None; + +private: + // Some layers may not render correctly on some hardware when the vertex attribute limit of + // that GPU is exceeded. More attributes are used when adding many data driven paint properties + // to a layer. + bool hasRenderFailures = false; }; } // namespace mbgl |