[core] Remove unused dot shader
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
#include <mbgl/shader/icon_shader.hpp>
|
||||
#include <mbgl/shader/raster_shader.hpp>
|
||||
#include <mbgl/shader/sdf_shader.hpp>
|
||||
#include <mbgl/shader/dot_shader.hpp>
|
||||
#include <mbgl/shader/box_shader.hpp>
|
||||
#include <mbgl/shader/circle_shader.hpp>
|
||||
|
||||
@@ -64,7 +63,6 @@ Painter::Painter(const TransformState& state_, gl::GLObjectStore& glObjectStore_
|
||||
rasterShader = std::make_unique<RasterShader>(glObjectStore);
|
||||
sdfGlyphShader = std::make_unique<SDFGlyphShader>(glObjectStore);
|
||||
sdfIconShader = std::make_unique<SDFIconShader>(glObjectStore);
|
||||
dotShader = std::make_unique<DotShader>(glObjectStore);
|
||||
collisionBoxShader = std::make_unique<CollisionBoxShader>(glObjectStore);
|
||||
circleShader = std::make_unique<CircleShader>(glObjectStore);
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ class IconShader;
|
||||
class RasterShader;
|
||||
class SDFGlyphShader;
|
||||
class SDFIconShader;
|
||||
class DotShader;
|
||||
class CollisionBoxShader;
|
||||
|
||||
struct ClipID;
|
||||
@@ -206,7 +205,6 @@ private:
|
||||
std::unique_ptr<RasterShader> rasterShader;
|
||||
std::unique_ptr<SDFGlyphShader> sdfGlyphShader;
|
||||
std::unique_ptr<SDFIconShader> sdfIconShader;
|
||||
std::unique_ptr<DotShader> dotShader;
|
||||
std::unique_ptr<CollisionBoxShader> collisionBoxShader;
|
||||
std::unique_ptr<CircleShader> circleShader;
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace mbgl {
|
||||
class SDFShader;
|
||||
class IconShader;
|
||||
class CollisionBoxShader;
|
||||
class DotShader;
|
||||
class CollisionTile;
|
||||
class SpriteAtlas;
|
||||
class SpriteStore;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
uniform vec4 u_color;
|
||||
uniform float u_blur;
|
||||
|
||||
void main() {
|
||||
float dist = length(gl_PointCoord - 0.5);
|
||||
float t = smoothstep(0.5, 0.5 - u_blur, dist);
|
||||
|
||||
gl_FragColor = u_color * t;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
uniform mat4 u_matrix;
|
||||
uniform float u_size;
|
||||
|
||||
attribute vec2 a_pos;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = u_matrix * vec4(a_pos, 0, 1);
|
||||
gl_PointSize = u_size;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
#include <mbgl/shader/dot_shader.hpp>
|
||||
#include <mbgl/shader/dot.vertex.hpp>
|
||||
#include <mbgl/shader/dot.fragment.hpp>
|
||||
#include <mbgl/gl/gl.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
using namespace mbgl;
|
||||
|
||||
DotShader::DotShader(gl::GLObjectStore& glObjectStore)
|
||||
: Shader("dot", shaders::dot::vertex, shaders::dot::fragment, glObjectStore) {
|
||||
}
|
||||
|
||||
void DotShader::bind(GLbyte* offset) {
|
||||
MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_pos));
|
||||
MBGL_CHECK_ERROR(glVertexAttribPointer(a_pos, 2, GL_SHORT, false, 8, offset));
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/shader/shader.hpp>
|
||||
#include <mbgl/shader/uniform.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
class DotShader : public Shader {
|
||||
public:
|
||||
DotShader(gl::GLObjectStore&);
|
||||
|
||||
void bind(GLbyte *offset) final;
|
||||
|
||||
UniformMatrix<4> u_matrix = {"u_matrix", *this};
|
||||
Uniform<std::array<GLfloat, 4>> u_color = {"u_color", *this};
|
||||
Uniform<GLfloat> u_size = {"u_size", *this};
|
||||
Uniform<GLfloat> u_blur = {"u_blur", *this};
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
Reference in New Issue
Block a user