diff options
Diffstat (limited to 'src/mbgl/programs/gl/fill_outline.cpp')
-rw-r--r-- | src/mbgl/programs/gl/fill_outline.cpp | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/src/mbgl/programs/gl/fill_outline.cpp b/src/mbgl/programs/gl/fill_outline.cpp index 07615b2138..e7644468a5 100644 --- a/src/mbgl/programs/gl/fill_outline.cpp +++ b/src/mbgl/programs/gl/fill_outline.cpp @@ -1,18 +1,37 @@ // NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. #include <mbgl/programs/fill_outline_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<FillOutlineProgram> { + static constexpr const char* name = "fill_outline"; + static constexpr const uint8_t hash[8] = { 0x56, 0x65, 0x69, 0x4b, 0x70, 0x2d, 0x3d, 0xc4 }; + static constexpr const auto vertexOffset = 13678; + static constexpr const auto fragmentOffset = 14503; +}; + +constexpr const char* ShaderSource<FillOutlineProgram>::name; +constexpr const uint8_t ShaderSource<FillOutlineProgram>::hash[8]; + +} // namespace gl +} // namespace programs + namespace gfx { template <> std::unique_ptr<Program<FillOutlineProgram>> Context::createProgram<gl::Context>(const ProgramParameters& programParameters) { - return gl::Program<FillOutlineProgram>::createProgram( - reinterpret_cast<gl::Context&>(*this), programParameters, "fill_outline", - programs::gl::shaderSource() + 13678, programs::gl::shaderSource() + 14503); + return std::make_unique<gl::Program<FillOutlineProgram>>(programParameters); } } // namespace gfx @@ -29,7 +48,7 @@ varying vec2 v_pos; #ifndef HAS_UNIFORM_u_outline_color -uniform lowp float a_outline_color_t; +uniform lowp float u_outline_color_t; attribute highp vec4 a_outline_color; varying highp vec4 outline_color; #else @@ -38,7 +57,7 @@ uniform highp vec4 u_outline_color; #ifndef HAS_UNIFORM_u_opacity -uniform lowp float a_opacity_t; +uniform lowp float u_opacity_t; attribute lowp vec2 a_opacity; varying lowp float opacity; #else @@ -49,14 +68,14 @@ uniform lowp float u_opacity; void main() { #ifndef HAS_UNIFORM_u_outline_color - outline_color = unpack_mix_color(a_outline_color, a_outline_color_t); + outline_color = unpack_mix_color(a_outline_color, u_outline_color_t); #else highp vec4 outline_color = u_outline_color; #endif #ifndef HAS_UNIFORM_u_opacity - opacity = unpack_mix_vec2(a_opacity, a_opacity_t); + opacity = unpack_mix_vec2(a_opacity, u_opacity_t); #else lowp float opacity = u_opacity; #endif |