summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/gl/line.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-03-19 14:02:10 +0100
committerKonstantin Käfer <mail@kkaefer.com>2019-03-20 15:40:47 +0100
commit1e30fdac36233c0fd0662e2b285b0424907bc81d (patch)
treeeb61b156b5445639939eab47f5ded9a385b25fd9 /src/mbgl/programs/gl/line.cpp
parent53ab65d81165daf4e23ce28fa0e42861724ea687 (diff)
downloadqtlocation-mapboxgl-1e30fdac36233c0fd0662e2b285b0424907bc81d.tar.gz
[core] move ProgramMap to within the gl::Program object
Diffstat (limited to 'src/mbgl/programs/gl/line.cpp')
-rw-r--r--src/mbgl/programs/gl/line.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/mbgl/programs/gl/line.cpp b/src/mbgl/programs/gl/line.cpp
index 1f96b74a9c..e59cb07cb9 100644
--- a/src/mbgl/programs/gl/line.cpp
+++ b/src/mbgl/programs/gl/line.cpp
@@ -1,18 +1,37 @@
// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#include <mbgl/programs/line_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<LineProgram> {
+ static constexpr const char* name = "line";
+ static constexpr const uint8_t hash[8] = { 0x44, 0x46, 0x9e, 0x59, 0x02, 0xbb, 0xaa, 0xae };
+ static constexpr const auto vertexOffset = 30585;
+ static constexpr const auto fragmentOffset = 33509;
+};
+
+constexpr const char* ShaderSource<LineProgram>::name;
+constexpr const uint8_t ShaderSource<LineProgram>::hash[8];
+
+} // namespace gl
+} // namespace programs
+
namespace gfx {
template <>
std::unique_ptr<Program<LineProgram>>
Context::createProgram<gl::Context>(const ProgramParameters& programParameters) {
- return gl::Program<LineProgram>::createProgram(
- reinterpret_cast<gl::Context&>(*this), programParameters, "line",
- programs::gl::shaderSource() + 30585, programs::gl::shaderSource() + 33509);
+ return std::make_unique<gl::Program<LineProgram>>(programParameters);
}
} // namespace gfx