diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-02-27 12:47:34 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-01 09:33:37 +0100 |
commit | 55c7b86053816e74c3fd3c0595c1fa053970f959 (patch) | |
tree | c34be5d76008fad4f28d39e9c39cc85ad31b72fe /src/mbgl/programs/background_program.hpp | |
parent | 7f1428ed3b90b54f503760471869ac83def32a59 (diff) | |
download | qtlocation-mapboxgl-55c7b86053816e74c3fd3c0595c1fa053970f959.tar.gz |
[core] extract uniform type lists from gl namespace
Diffstat (limited to 'src/mbgl/programs/background_program.hpp')
-rw-r--r-- | src/mbgl/programs/background_program.hpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/mbgl/programs/background_program.hpp b/src/mbgl/programs/background_program.hpp index 6f9ab2a200..1cdc99e0ca 100644 --- a/src/mbgl/programs/background_program.hpp +++ b/src/mbgl/programs/background_program.hpp @@ -21,13 +21,12 @@ template <class> class Faded; using BackgroundLayoutAttributes = PositionOnlyLayoutAttributes; -struct BackgroundUniforms : gl::Uniforms< +using BackgroundUniforms = TypeList< uniforms::u_matrix, uniforms::u_color, - uniforms::u_opacity> -{}; + uniforms::u_opacity>; -struct BackgroundPatternUniforms : gl::Uniforms< +using BackgroundPatternUniforms = TypeList< uniforms::u_matrix, uniforms::u_opacity, uniforms::u_texsize, @@ -43,17 +42,7 @@ struct BackgroundPatternUniforms : gl::Uniforms< uniforms::u_image, uniforms::u_pixel_coord_upper, uniforms::u_pixel_coord_lower, - uniforms::u_tile_units_to_pixels> -{ - static Values values(mat4 matrix, - float opacity, - Size atlasSize, - const ImagePosition&, - const ImagePosition&, - const CrossfadeParameters&, - const UnwrappedTileID&, - const TransformState&); -}; + uniforms::u_tile_units_to_pixels>; class BackgroundProgram : public Program< shaders::background, @@ -75,6 +64,15 @@ class BackgroundPatternProgram : public Program< { public: using Program::Program; + + static UniformValues uniformValues(mat4 matrix, + float opacity, + Size atlasSize, + const ImagePosition&, + const ImagePosition&, + const CrossfadeParameters&, + const UnwrappedTileID&, + const TransformState&); }; using BackgroundLayoutVertex = BackgroundProgram::LayoutVertex; |