diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2014-07-29 17:03:08 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2014-08-27 18:22:20 -0700 |
commit | e2c2ab843e5532b5bf627370ed8037121b961a8d (patch) | |
tree | 849c98e326309c6717dc344d0bc983f639a1dfdc /include/mbgl/renderer | |
parent | a62a826b56b0150b3aebe81fb2b42fe6eb84c0b6 (diff) | |
download | qtlocation-mapboxgl-e2c2ab843e5532b5bf627370ed8037121b961a8d.tar.gz |
Render background with plain shader
Diffstat (limited to 'include/mbgl/renderer')
-rw-r--r-- | include/mbgl/renderer/painter.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/mbgl/renderer/painter.hpp b/include/mbgl/renderer/painter.hpp index fcbafc52d5..e2d56b1514 100644 --- a/include/mbgl/renderer/painter.hpp +++ b/include/mbgl/renderer/painter.hpp @@ -86,6 +86,8 @@ public: void renderLine(LineBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id, const mat4 &matrix); void renderSymbol(SymbolBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id, const mat4 &matrix); void renderRaster(RasterBucket& bucket, std::shared_ptr<StyleLayer> layer_desc, const Tile::ID& id, const mat4 &matrix); + void renderBackground(std::shared_ptr<StyleLayer> layer_desc); + std::array<float, 3> spinWeights(float spin_value); void preparePrerender(RasterBucket &bucket); @@ -142,6 +144,12 @@ public: return flipMatrix; }(); + const mat4 identityMatrix = []{ + mat4 identity; + matrix::identity(identity); + return identity; + }(); + private: Map& map; @@ -170,6 +178,13 @@ public: std::unique_ptr<DotShader> dotShader; std::unique_ptr<GaussianShader> gaussianShader; + StaticVertexBuffer backgroundBuffer = { + { -1, -1 }, { 1, -1 }, + { -1, 1 }, { 1, 1 } + }; + + VertexArrayObject backgroundArray; + // Set up the stencil quad we're using to generate the stencil mask. StaticVertexBuffer tileStencilBuffer = { // top left triangle |