summaryrefslogtreecommitdiff
path: root/include/mbgl/renderer/painter.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-10-21 15:00:44 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-10-29 09:58:56 -0400
commitda8aa391d0a1079bbc697207803a48fce8ab916f (patch)
tree4fbf6a2dcc594860aa43517e6d78c542c7eff115 /include/mbgl/renderer/painter.hpp
parent4f7bc80664c29d7f15598392946ff0ac73dd520c (diff)
downloadqtlocation-mapboxgl-da8aa391d0a1079bbc697207803a48fce8ab916f.tar.gz
Render map with a copy of TransformState
Diffstat (limited to 'include/mbgl/renderer/painter.hpp')
-rw-r--r--include/mbgl/renderer/painter.hpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/mbgl/renderer/painter.hpp b/include/mbgl/renderer/painter.hpp
index a8229a0978..2b0ac070f7 100644
--- a/include/mbgl/renderer/painter.hpp
+++ b/include/mbgl/renderer/painter.hpp
@@ -35,9 +35,12 @@ enum class RenderPass : bool { Opaque, Translucent };
class Transform;
class Style;
class Tile;
+class Sprite;
+class SpriteAtlas;
class GlyphAtlas;
class Source;
class StyleSource;
+class StyleLayerGroup;
class FillBucket;
class LineBucket;
@@ -53,10 +56,9 @@ class RasterTileData;
class Painter : private util::noncopyable {
public:
- Painter(Map &map);
+ Painter(SpriteAtlas&, GlyphAtlas&);
~Painter();
-
void setup();
// Perform cleanup tasks that prepare shutting down the app. This doesn't mean that the
@@ -73,6 +75,14 @@ public:
// Updates the default matrices to the current viewport dimensions.
void changeMatrix();
+ void render(const Style& style,
+ const std::set<util::ptr<StyleSource>>& sources,
+ TransformState state,
+ timestamp time);
+
+ void renderLayers(util::ptr<StyleLayerGroup> group);
+ void renderLayer(util::ptr<StyleLayer> layer_desc, RenderPass pass, const Tile::ID* id = nullptr, const mat4* matrix = nullptr);
+
// Renders a particular layer from a tile.
void renderTileLayer(const Tile& tile, util::ptr<StyleLayer> layer_desc, const mat4 &matrix);
@@ -167,9 +177,10 @@ public:
}();
private:
- Map& map;
+ TransformState state;
bool debug = false;
+ int indent = 0;
uint32_t gl_program = 0;
float gl_lineWidth = 0;
@@ -183,6 +194,9 @@ private:
public:
FrameHistory frameHistory;
+ SpriteAtlas& spriteAtlas;
+ GlyphAtlas& glyphAtlas;
+
std::unique_ptr<PlainShader> plainShader;
std::unique_ptr<OutlineShader> outlineShader;
std::unique_ptr<LineShader> lineShader;