summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/gl/raster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/programs/gl/raster.cpp')
-rw-r--r--src/mbgl/programs/gl/raster.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/mbgl/programs/gl/raster.cpp b/src/mbgl/programs/gl/raster.cpp
index 512dc81a30..1867a48f1c 100644
--- a/src/mbgl/programs/gl/raster.cpp
+++ b/src/mbgl/programs/gl/raster.cpp
@@ -1,18 +1,37 @@
// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#include <mbgl/programs/raster_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<RasterProgram> {
+ static constexpr const char* name = "raster";
+ static constexpr const uint8_t hash[8] = { 0x40, 0x3d, 0x6c, 0xf4, 0xd0, 0x41, 0x51, 0x0e };
+ static constexpr const auto vertexOffset = 48592;
+ static constexpr const auto fragmentOffset = 48941;
+};
+
+constexpr const char* ShaderSource<RasterProgram>::name;
+constexpr const uint8_t ShaderSource<RasterProgram>::hash[8];
+
+} // namespace gl
+} // namespace programs
+
namespace gfx {
template <>
std::unique_ptr<Program<RasterProgram>>
Context::createProgram<gl::Context>(const ProgramParameters& programParameters) {
- return gl::Program<RasterProgram>::createProgram(
- reinterpret_cast<gl::Context&>(*this), programParameters, "raster",
- programs::gl::shaderSource() + 48592, programs::gl::shaderSource() + 48941);
+ return std::make_unique<gl::Program<RasterProgram>>(programParameters);
}
} // namespace gfx