summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-18 15:32:49 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-20 13:24:20 +0300
commit76fc07c606fa62fefc1e2aa435a51a8b5fd384cd (patch)
treef95d3a09f6f58df952340809b104e25a6fb033a7 /scripts
parent760a692378a8ae7c9cc87246c10f2fe9a64117bd (diff)
downloadqtlocation-mapboxgl-76fc07c606fa62fefc1e2aa435a51a8b5fd384cd.tar.gz
[core] Autogenerate Shader name
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-shaders.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/build-shaders.py b/scripts/build-shaders.py
index 3b02cdc886..d679172554 100755
--- a/scripts/build-shaders.py
+++ b/scripts/build-shaders.py
@@ -50,6 +50,11 @@ namespace mbgl {{
namespace shaders {{
namespace {name} {{
+#ifndef MBGL_SHADER_NAME_{NAME}
+#define MBGL_SHADER_NAME_{NAME}
+constexpr const char* name = "{name}";
+#endif // MBGL_SHADER_NAME_{NAME}
+
#ifdef GL_ES_VERSION_2_0
constexpr const char* {type} = R"MBGL_SHADER(precision highp float;\n{data})MBGL_SHADER";
#else