diff options
Diffstat (limited to 'src/mbgl/shader/texture_rect_vertex.hpp')
-rw-r--r-- | src/mbgl/shader/texture_rect_vertex.hpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mbgl/shader/texture_rect_vertex.hpp b/src/mbgl/shader/texture_rect_vertex.hpp index e2e2526f16..4c45087c68 100644 --- a/src/mbgl/shader/texture_rect_vertex.hpp +++ b/src/mbgl/shader/texture_rect_vertex.hpp @@ -1,5 +1,8 @@ #pragma once +#include <mbgl/gl/attribute.hpp> + +#include <array> #include <cstdint> #include <cmath> @@ -32,8 +35,21 @@ public: const int16_t a_offset[2]; const uint16_t a_texture_pos[2]; const uint8_t a_data[4]; +}; + +namespace gl { - static void bind(const int8_t* offset); +template <class Shader> +struct AttributeBindings<Shader, TextureRectVertex> { + std::array<AttributeBinding, 4> operator()(const Shader& shader) { + return {{ + MBGL_MAKE_ATTRIBUTE_BINDING(TextureRectVertex, shader, a_pos), + MBGL_MAKE_ATTRIBUTE_BINDING(TextureRectVertex, shader, a_offset), + MBGL_MAKE_ATTRIBUTE_BINDING(TextureRectVertex, shader, a_texture_pos), + MBGL_MAKE_ATTRIBUTE_BINDING(TextureRectVertex, shader, a_data) + }}; + }; }; +} // namespace gl } // namespace mbgl |