summaryrefslogtreecommitdiff
path: root/include/mbgl/renderer/painter.hpp
diff options
context:
space:
mode:
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;