diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2014-09-05 14:43:52 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2014-09-08 15:12:32 -0700 |
commit | eb4f53cbed1953d4016975d14424fb2bc6bbf3d3 (patch) | |
tree | 7fb5a502641ed762a7579165408678bf8a51c0a2 /include/mbgl/renderer/painter.hpp | |
parent | 2033eb94941496ac12fa3af21fb75764af17e4b9 (diff) | |
download | qtlocation-mapboxgl-eb4f53cbed1953d4016975d14424fb2bc6bbf3d3.tar.gz |
SDF icon support (fixes #404)
Diffstat (limited to 'include/mbgl/renderer/painter.hpp')
-rw-r--r-- | include/mbgl/renderer/painter.hpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/mbgl/renderer/painter.hpp b/include/mbgl/renderer/painter.hpp index af50a6b52a..75529d1136 100644 --- a/include/mbgl/renderer/painter.hpp +++ b/include/mbgl/renderer/painter.hpp @@ -120,12 +120,24 @@ public: void discardFramebuffers(); bool needsAnimation() const; + private: void setupShaders(); mat4 translatedMatrix(const mat4& matrix, const std::array<float, 2> &translation, const Tile::ID &id, TranslateAnchorType anchor); void prepareTile(const Tile& tile); + template <typename BucketProperties, typename StyleProperties> + void renderSDF(SymbolBucket &bucket, + const Tile::ID &id, + const mat4 &matrixSymbol, + const BucketProperties& bucketProperties, + const StyleProperties& styleProperties, + float scaleDivisor, + std::array<float, 2> texsize, + SDFShader& sdfShader, + void (SymbolBucket::*drawSDF)(SDFShader&)); + public: void useProgram(uint32_t program); void lineWidth(float lineWidth); @@ -176,7 +188,8 @@ public: std::unique_ptr<PatternShader> patternShader; std::unique_ptr<IconShader> iconShader; std::unique_ptr<RasterShader> rasterShader; - std::unique_ptr<SDFShader> sdfShader; + std::unique_ptr<SDFGlyphShader> sdfGlyphShader; + std::unique_ptr<SDFIconShader> sdfIconShader; std::unique_ptr<DotShader> dotShader; std::unique_ptr<GaussianShader> gaussianShader; |