diff options
Diffstat (limited to 'src/mbgl/programs/gl/background.cpp')
-rw-r--r-- | src/mbgl/programs/gl/background.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/mbgl/programs/gl/background.cpp b/src/mbgl/programs/gl/background.cpp index da5ea2541..78074d670 100644 --- a/src/mbgl/programs/gl/background.cpp +++ b/src/mbgl/programs/gl/background.cpp @@ -1,18 +1,37 @@ // NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. #include <mbgl/programs/background_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<BackgroundProgram> { + static constexpr const char* name = "background"; + static constexpr const uint8_t hash[8] = { 0x2d, 0xef, 0x97, 0xa2, 0xec, 0xb5, 0x67, 0xef }; + static constexpr const auto vertexOffset = 1429; + static constexpr const auto fragmentOffset = 1525; +}; + +constexpr const char* ShaderSource<BackgroundProgram>::name; +constexpr const uint8_t ShaderSource<BackgroundProgram>::hash[8]; + +} // namespace gl +} // namespace programs + namespace gfx { template <> std::unique_ptr<Program<BackgroundProgram>> Context::createProgram<gl::Context>(const ProgramParameters& programParameters) { - return gl::Program<BackgroundProgram>::createProgram( - reinterpret_cast<gl::Context&>(*this), programParameters, "background", - programs::gl::shaderSource() + 1429, programs::gl::shaderSource() + 1525); + return std::make_unique<gl::Program<BackgroundProgram>>(programParameters); } } // namespace gfx |