diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-03-19 14:02:10 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-20 15:40:47 +0100 |
commit | 1e30fdac36233c0fd0662e2b285b0424907bc81d (patch) | |
tree | eb61b156b5445639939eab47f5ded9a385b25fd9 /src/mbgl/programs/gl/fill.cpp | |
parent | 53ab65d81165daf4e23ce28fa0e42861724ea687 (diff) | |
download | qtlocation-mapboxgl-1e30fdac36233c0fd0662e2b285b0424907bc81d.tar.gz |
[core] move ProgramMap to within the gl::Program object
Diffstat (limited to 'src/mbgl/programs/gl/fill.cpp')
-rw-r--r-- | src/mbgl/programs/gl/fill.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/mbgl/programs/gl/fill.cpp b/src/mbgl/programs/gl/fill.cpp index 44ab40949c..a699f82609 100644 --- a/src/mbgl/programs/gl/fill.cpp +++ b/src/mbgl/programs/gl/fill.cpp @@ -1,18 +1,37 @@ // NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. #include <mbgl/programs/fill_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<FillProgram> { + static constexpr const char* name = "fill"; + static constexpr const uint8_t hash[8] = { 0x87, 0xea, 0x65, 0x7f, 0x0c, 0x9b, 0x97, 0x5d }; + static constexpr const auto vertexOffset = 12610; + static constexpr const auto fragmentOffset = 13254; +}; + +constexpr const char* ShaderSource<FillProgram>::name; +constexpr const uint8_t ShaderSource<FillProgram>::hash[8]; + +} // namespace gl +} // namespace programs + namespace gfx { template <> std::unique_ptr<Program<FillProgram>> Context::createProgram<gl::Context>(const ProgramParameters& programParameters) { - return gl::Program<FillProgram>::createProgram( - reinterpret_cast<gl::Context&>(*this), programParameters, "fill", - programs::gl::shaderSource() + 12610, programs::gl::shaderSource() + 13254); + return std::make_unique<gl::Program<FillProgram>>(programParameters); } } // namespace gfx |