summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/gl/fill_extrusion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/programs/gl/fill_extrusion.cpp')
-rw-r--r--src/mbgl/programs/gl/fill_extrusion.cpp37
1 files changed, 28 insertions, 9 deletions
diff --git a/src/mbgl/programs/gl/fill_extrusion.cpp b/src/mbgl/programs/gl/fill_extrusion.cpp
index 45ebb68dd4..83a8eadee6 100644
--- a/src/mbgl/programs/gl/fill_extrusion.cpp
+++ b/src/mbgl/programs/gl/fill_extrusion.cpp
@@ -1,18 +1,37 @@
// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#include <mbgl/programs/fill_extrusion_program.hpp>
+#include <mbgl/programs/gl/preludes.hpp>
#include <mbgl/programs/gl/shader_source.hpp>
#include <mbgl/gl/program.hpp>
namespace mbgl {
+namespace programs {
+namespace gl {
+
+template <typename>
+struct ShaderSource;
+
+template <>
+struct ShaderSource<FillExtrusionProgram> {
+ static constexpr const char* name = "fill_extrusion";
+ static constexpr const uint8_t hash[8] = { 0x49, 0x8a, 0xa2, 0x8b, 0x21, 0x74, 0x27, 0x93 };
+ static constexpr const auto vertexOffset = 21238;
+ static constexpr const auto fragmentOffset = 23121;
+};
+
+constexpr const char* ShaderSource<FillExtrusionProgram>::name;
+constexpr const uint8_t ShaderSource<FillExtrusionProgram>::hash[8];
+
+} // namespace gl
+} // namespace programs
+
namespace gfx {
template <>
std::unique_ptr<Program<FillExtrusionProgram>>
Context::createProgram<gl::Context>(const ProgramParameters& programParameters) {
- return gl::Program<FillExtrusionProgram>::createProgram(
- reinterpret_cast<gl::Context&>(*this), programParameters, "fill_extrusion",
- programs::gl::shaderSource() + 21238, programs::gl::shaderSource() + 23121);
+ return std::make_unique<gl::Program<FillExtrusionProgram>>(programParameters);
}
} // namespace gfx
@@ -33,7 +52,7 @@ varying vec4 v_color;
#ifndef HAS_UNIFORM_u_base
-uniform lowp float a_base_t;
+uniform lowp float u_base_t;
attribute highp vec2 a_base;
#else
uniform highp float u_base;
@@ -41,7 +60,7 @@ uniform highp float u_base;
#ifndef HAS_UNIFORM_u_height
-uniform lowp float a_height_t;
+uniform lowp float u_height_t;
attribute highp vec2 a_height;
#else
uniform highp float u_height;
@@ -50,7 +69,7 @@ uniform highp float u_height;
#ifndef HAS_UNIFORM_u_color
-uniform lowp float a_color_t;
+uniform lowp float u_color_t;
attribute highp vec4 a_color;
#else
uniform highp vec4 u_color;
@@ -60,21 +79,21 @@ uniform highp vec4 u_color;
void main() {
#ifndef HAS_UNIFORM_u_base
- highp float base = unpack_mix_vec2(a_base, a_base_t);
+ highp float base = unpack_mix_vec2(a_base, u_base_t);
#else
highp float base = u_base;
#endif
#ifndef HAS_UNIFORM_u_height
- highp float height = unpack_mix_vec2(a_height, a_height_t);
+ highp float height = unpack_mix_vec2(a_height, u_height_t);
#else
highp float height = u_height;
#endif
#ifndef HAS_UNIFORM_u_color
- highp vec4 color = unpack_mix_color(a_color, a_color_t);
+ highp vec4 color = unpack_mix_color(a_color, u_color_t);
#else
highp vec4 color = u_color;
#endif