Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Added circle shader as member of Painter class
Browse files Browse the repository at this point in the history
Part of #1740.
  • Loading branch information
brunoabinader committed Jun 18, 2015
1 parent 743f1ed commit 789f189
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mbgl/renderer/painter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <mbgl/shader/dot_shader.hpp>
#include <mbgl/shader/gaussian_shader.hpp>
#include <mbgl/shader/box_shader.hpp>
#include <mbgl/shader/circle_shader.hpp>

#include <mbgl/util/constants.hpp>
#include <mbgl/util/mat3.hpp>
Expand Down Expand Up @@ -66,6 +67,7 @@ void Painter::setup() {
assert(sdfIconShader);
assert(dotShader);
assert(gaussianShader);
assert(circleShader);


// Blending
Expand Down Expand Up @@ -101,6 +103,7 @@ void Painter::setupShaders() {
if (!dotShader) dotShader = std::make_unique<DotShader>();
if (!gaussianShader) gaussianShader = std::make_unique<GaussianShader>();
if (!collisionBoxShader) collisionBoxShader = std::make_unique<CollisionBoxShader>();
if (!circleShader) circleShader = std::make_unique<CircleShader>();
}

void Painter::resize() {
Expand Down
2 changes: 2 additions & 0 deletions src/mbgl/renderer/painter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class LineShader;
class LinejoinShader;
class LineSDFShader;
class LinepatternShader;
class CircleShader;
class PatternShader;
class IconShader;
class RasterShader;
Expand Down Expand Up @@ -221,6 +222,7 @@ class Painter : private util::noncopyable {
std::unique_ptr<DotShader> dotShader;
std::unique_ptr<GaussianShader> gaussianShader;
std::unique_ptr<CollisionBoxShader> collisionBoxShader;
std::unique_ptr<CircleShader> circleShader;

StaticVertexBuffer backgroundBuffer = {
{ -1, -1 }, { 1, -1 },
Expand Down

0 comments on commit 789f189

Please sign in to comment.