summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/sdf_shader.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/shader/sdf_shader.hpp')
-rw-r--r--src/mbgl/shader/sdf_shader.hpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mbgl/shader/sdf_shader.hpp b/src/mbgl/shader/sdf_shader.hpp
index 5c10e2c52c..68e65bbb18 100644
--- a/src/mbgl/shader/sdf_shader.hpp
+++ b/src/mbgl/shader/sdf_shader.hpp
@@ -1,23 +1,24 @@
#pragma once
#include <mbgl/gl/shader.hpp>
+#include <mbgl/gl/attribute.hpp>
#include <mbgl/gl/uniform.hpp>
#include <mbgl/util/color.hpp>
namespace mbgl {
-namespace gl {
-template <class> class VertexBuffer;
-} // namespace gl
-
class TextureRectVertex;
class SDFShader : public gl::Shader {
public:
SDFShader(gl::Context&, Defines defines = None);
- void bind(const gl::VertexBuffer<TextureRectVertex>&,
- const int8_t* offset);
+ using VertexType = TextureRectVertex;
+
+ gl::Attribute<int16_t, 2> a_pos = { "a_pos", *this };
+ gl::Attribute<int16_t, 2> a_offset = { "a_offset", *this };
+ gl::Attribute<uint16_t, 2> a_texture_pos = { "a_texture_pos", *this };
+ gl::Attribute<uint8_t, 4> a_data = { "a_data", *this };
gl::UniformMatrix<4> u_matrix = {"u_matrix", *this};
gl::Uniform<std::array<float, 2>> u_extrude_scale = {"u_extrude_scale", *this};