diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-11-14 16:58:25 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-12-02 17:11:49 +0200 |
commit | 26bf566f535e55c6d82830e3b0f5a2702a0fec42 (patch) | |
tree | fde3beaa430e06151b68f6c346bc7b103debd28b /scripts/generate-shaders.js | |
parent | 2c49c4374cb9e3654c1d347b1071542918ce5fd2 (diff) | |
download | qtlocation-mapboxgl-26bf566f535e55c6d82830e3b0f5a2702a0fec42.tar.gz |
[core] Use new 'SymbolTextAndIcon' program to draw icons in text
Diffstat (limited to 'scripts/generate-shaders.js')
-rwxr-xr-x | scripts/generate-shaders.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/generate-shaders.js b/scripts/generate-shaders.js index cb0c945f3c..69cdb5bb28 100755 --- a/scripts/generate-shaders.js +++ b/scripts/generate-shaders.js @@ -108,9 +108,10 @@ namespace mbgl { namespace programs { namespace gl { +// clang-format off constexpr const uint8_t compressedShaderSource[] = { - ${compressed} -}; + ${compressed}}; +// clang-format on const char* shaderSource() { static std::string decompressed = util::decompress(std::string(reinterpret_cast<const char*>(compressedShaderSource), sizeof(compressedShaderSource))); @@ -132,7 +133,7 @@ namespace mbgl { namespace programs { namespace gl { -constexpr const uint8_t preludeHash[8] = { ${offsets['prelude'].hash} }; +constexpr const uint8_t preludeHash[8] = {${offsets['prelude'].hash}}; constexpr const auto vertexPreludeOffset = ${offsets['prelude'].vertex}; constexpr const auto fragmentPreludeOffset = ${offsets['prelude'].fragment}; @@ -148,7 +149,7 @@ for (const key in offsets) { const { shaderName, ShaderName, originalKey } = offsets[key]; writeIfModified(path.join(outputPath, 'gl', `${shaderName}.cpp`), `// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. - +// clang-format off #include <mbgl/programs/${shaderName}_program.hpp> #include <mbgl/programs/gl/preludes.hpp> #include <mbgl/programs/gl/shader_source.hpp> @@ -164,7 +165,7 @@ struct ShaderSource; template <> struct ShaderSource<${ShaderName}Program> { static constexpr const char* name = "${shaderName}"; - static constexpr const uint8_t hash[8] = { ${offsets[key].hash} }; + static constexpr const uint8_t hash[8] = {${offsets[key].hash}}; static constexpr const auto vertexOffset = ${offsets[key].vertex}; static constexpr const auto fragmentOffset = ${offsets[key].fragment}; }; @@ -195,6 +196,6 @@ ${shaders[originalKey].vertexSource} /* ${shaders[originalKey].fragmentSource} */ - +// clang-format on `); } |