summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-07-29 17:03:08 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-08-27 18:22:20 -0700
commite2c2ab843e5532b5bf627370ed8037121b961a8d (patch)
tree849c98e326309c6717dc344d0bc983f639a1dfdc /include
parenta62a826b56b0150b3aebe81fb2b42fe6eb84c0b6 (diff)
downloadqtlocation-mapboxgl-e2c2ab843e5532b5bf627370ed8037121b961a8d.tar.gz
Render background with plain shader
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/renderer/painter.hpp15
-rw-r--r--include/mbgl/style/style.hpp3
2 files changed, 15 insertions, 3 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
diff --git a/include/mbgl/style/style.hpp b/include/mbgl/style/style.hpp
index 6acb5d0cb8..c09de6ebba 100644
--- a/include/mbgl/style/style.hpp
+++ b/include/mbgl/style/style.hpp
@@ -20,7 +20,6 @@ namespace mbgl {
class Sprite;
class StyleLayer;
class StyleLayerGroup;
-struct BackgroundProperties;
class Style {
public:
@@ -47,8 +46,6 @@ public:
bool hasTransitions() const;
- const BackgroundProperties &getBackgroundProperties() const;
-
const std::string &getSpriteURL() const;
public: