diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-03-19 14:02:10 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-20 15:40:47 +0100 |
commit | 53ab65d81165daf4e23ce28fa0e42861724ea687 (patch) | |
tree | 402a535476210bf3527b487011a0f7ccb78ef73d /scripts/generate-shaders.js | |
parent | 0ad2375e1047353fc65fabce3ac9123dc095179e (diff) | |
download | qtlocation-mapboxgl-53ab65d81165daf4e23ce28fa0e42861724ea687.tar.gz |
[core] use constexpr string concatenation for uniform/attribute names
Diffstat (limited to 'scripts/generate-shaders.js')
-rwxr-xr-x | scripts/generate-shaders.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/generate-shaders.js b/scripts/generate-shaders.js index 59544d0b34..4f58608e20 100755 --- a/scripts/generate-shaders.js +++ b/scripts/generate-shaders.js @@ -23,6 +23,11 @@ function basicMinify(src) { } for (const key in shaders) { + // Rename a_*_t uniforms to u_*_t. This is a workaround until we can use + // https://github.com/mapbox/mapbox-gl-js/pull/8055, which is blocked by + // https://github.com/mapbox/mapbox-gl-native/issues/13984 + shaders[key].vertexSource = shaders[key].vertexSource.replace(/\ba_(\w+)_t\b/mg, 'u_$1_t'); + const vertex = concatenated.length; concatenated += basicMinify(shaders[key].vertexSource); concatenated += '\n\0'; |