summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/gl/circle.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/circle.cpp
parent53ab65d81165daf4e23ce28fa0e42861724ea687 (diff)
downloadqtlocation-mapboxgl-1e30fdac36233c0fd0662e2b285b0424907bc81d.tar.gz
[core] move ProgramMap to within the gl::Program object
Diffstat (limited to 'src/mbgl/programs/gl/circle.cpp')
-rw-r--r--src/mbgl/programs/gl/circle.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/mbgl/programs/gl/circle.cpp b/src/mbgl/programs/gl/circle.cpp
index ae2b65c20f..d1f1e29d33 100644
--- a/src/mbgl/programs/gl/circle.cpp
+++ b/src/mbgl/programs/gl/circle.cpp
@@ -1,18 +1,37 @@
// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.
#include <mbgl/programs/circle_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<CircleProgram> {
+ static constexpr const char* name = "circle";
+ static constexpr const uint8_t hash[8] = { 0xf0, 0x3e, 0x18, 0xb7, 0x75, 0xb2, 0xde, 0xa9 };
+ static constexpr const auto vertexOffset = 2927;
+ static constexpr const auto fragmentOffset = 6093;
+};
+
+constexpr const char* ShaderSource<CircleProgram>::name;
+constexpr const uint8_t ShaderSource<CircleProgram>::hash[8];
+
+} // namespace gl
+} // namespace programs
+
namespace gfx {
template <>
std::unique_ptr<Program<CircleProgram>>
Context::createProgram<gl::Context>(const ProgramParameters& programParameters) {
- return gl::Program<CircleProgram>::createProgram(
- reinterpret_cast<gl::Context&>(*this), programParameters, "circle",
- programs::gl::shaderSource() + 2927, programs::gl::shaderSource() + 6093);
+ return std::make_unique<gl::Program<CircleProgram>>(programParameters);
}
} // namespace gfx