diff options
-rwxr-xr-x | scripts/build-shaders.py | 5 | ||||
-rw-r--r-- | src/mbgl/renderer/painter_fill.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/shader/outline_shader.hpp | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/scripts/build-shaders.py b/scripts/build-shaders.py index 60e8552123..d94a8cdd58 100755 --- a/scripts/build-shaders.py +++ b/scripts/build-shaders.py @@ -28,7 +28,7 @@ def replace_uniform_pragmas(line): if pragma_mapbox_regex.match(line): params = line.split() u_method = params[2] - u_name = "color" if color_regex.match(params[3]) else params[3] + u_name = params[3] u_precision = params[4] u_type = "vec4" if color_regex.match(u_name) else "float" if u_method == "define": @@ -37,10 +37,9 @@ def replace_uniform_pragmas(line): type_ = u_type, name = u_name) else: - return """ {precision} {type_} {glsl_name} = u_{name};""".format( + return """ {precision} {type_} {name} = u_{name};""".format( precision = u_precision, type_ = u_type, - glsl_name = params[3], name = u_name) else: return line diff --git a/src/mbgl/renderer/painter_fill.cpp b/src/mbgl/renderer/painter_fill.cpp index b89686c815..4c6ad1ba0f 100644 --- a/src/mbgl/renderer/painter_fill.cpp +++ b/src/mbgl/renderer/painter_fill.cpp @@ -55,7 +55,7 @@ void Painter::renderFill(FillBucket& bucket, outlineShader->u_matrix = vtxMatrix; config.lineWidth = 2.0f; // This is always fixed and does not depend on the pixelRatio! - outlineShader->u_color = stroke_color; + outlineShader->u_outline_color = stroke_color; outlineShader->u_opacity = opacity; // Draw the entire line @@ -184,7 +184,7 @@ void Painter::renderFill(FillBucket& bucket, outlineShader->u_matrix = vtxMatrix; config.lineWidth = 2.0f; // This is always fixed and does not depend on the pixelRatio! - outlineShader->u_color = fill_color; + outlineShader->u_outline_color = fill_color; outlineShader->u_opacity = opacity; // Draw the entire line diff --git a/src/mbgl/shader/outline_shader.hpp b/src/mbgl/shader/outline_shader.hpp index 22b9013afd..25c873b4fe 100644 --- a/src/mbgl/shader/outline_shader.hpp +++ b/src/mbgl/shader/outline_shader.hpp @@ -11,10 +11,10 @@ public: 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_opacity = {"u_opacity", *this}; - Uniform<std::array<GLfloat, 2>> u_world = {"u_world", *this}; + UniformMatrix<4> u_matrix = {"u_matrix", *this}; + Uniform<std::array<GLfloat, 4>> u_outline_color = {"u_outline_color", *this}; + Uniform<GLfloat> u_opacity = {"u_opacity", *this}; + Uniform<std::array<GLfloat, 2>> u_world = {"u_world", *this}; }; } // namespace mbgl |