summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/gl/hillshade.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/programs/gl/hillshade.cpp')
-rw-r--r--src/mbgl/programs/gl/hillshade.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/mbgl/programs/gl/hillshade.cpp b/src/mbgl/programs/gl/hillshade.cpp
index dcf90f1149..a33ddb4326 100644
--- a/src/mbgl/programs/gl/hillshade.cpp
+++ b/src/mbgl/programs/gl/hillshade.cpp
@@ -1,18 +1,37 @@
// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#include <mbgl/programs/hillshade_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<HillshadeProgram> {
+ static constexpr const char* name = "hillshade";
+ static constexpr const uint8_t hash[8] = { 0x8a, 0x11, 0x29, 0x18, 0x52, 0x7f, 0x3b, 0xbb };
+ static constexpr const auto vertexOffset = 29340;
+ static constexpr const auto fragmentOffset = 29511;
+};
+
+constexpr const char* ShaderSource<HillshadeProgram>::name;
+constexpr const uint8_t ShaderSource<HillshadeProgram>::hash[8];
+
+} // namespace gl
+} // namespace programs
+
namespace gfx {
template <>
std::unique_ptr<Program<HillshadeProgram>>
Context::createProgram<gl::Context>(const ProgramParameters& programParameters) {
- return gl::Program<HillshadeProgram>::createProgram(
- reinterpret_cast<gl::Context&>(*this), programParameters, "hillshade",
- programs::gl::shaderSource() + 29340, programs::gl::shaderSource() + 29511);
+ return std::make_unique<gl::Program<HillshadeProgram>>(programParameters);
}
} // namespace gfx