From 1e30fdac36233c0fd0662e2b285b0424907bc81d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 19 Mar 2019 14:02:10 +0100 Subject: [core] move ProgramMap to within the gl::Program object --- src/mbgl/programs/gl/fill.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/mbgl/programs/gl/fill.cpp') diff --git a/src/mbgl/programs/gl/fill.cpp b/src/mbgl/programs/gl/fill.cpp index 44ab40949c..a699f82609 100644 --- a/src/mbgl/programs/gl/fill.cpp +++ b/src/mbgl/programs/gl/fill.cpp @@ -1,18 +1,37 @@ // NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. #include +#include #include #include namespace mbgl { +namespace programs { +namespace gl { + +template +struct ShaderSource; + +template <> +struct ShaderSource { + static constexpr const char* name = "fill"; + static constexpr const uint8_t hash[8] = { 0x87, 0xea, 0x65, 0x7f, 0x0c, 0x9b, 0x97, 0x5d }; + static constexpr const auto vertexOffset = 12610; + static constexpr const auto fragmentOffset = 13254; +}; + +constexpr const char* ShaderSource::name; +constexpr const uint8_t ShaderSource::hash[8]; + +} // namespace gl +} // namespace programs + namespace gfx { template <> std::unique_ptr> Context::createProgram(const ProgramParameters& programParameters) { - return gl::Program::createProgram( - reinterpret_cast(*this), programParameters, "fill", - programs::gl::shaderSource() + 12610, programs::gl::shaderSource() + 13254); + return std::make_unique>(programParameters); } } // namespace gfx -- cgit v1.2.1