summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-09-19 13:21:02 -0700
committerChris Loer <chris.loer@mapbox.com>2018-09-19 16:19:28 -0700
commitf7a69d15ab1f43598caaa9498cc7e8aa7a11af0c (patch)
treed02c7a07078e91123e0763f8c7ac120cff223777 /scripts
parent9b09ec1e6a4de3acfddd8dcd83e9c8596c60e0e0 (diff)
downloadqtlocation-mapboxgl-f7a69d15ab1f43598caaa9498cc7e8aa7a11af0c.tar.gz
[docs] Include uncompressed shader source in .cpp comments
This is meant to (1) Make it easier for new developers to find the source (2) Make it easier to look at shader diffs when the GL JS pin changes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate-shaders.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/generate-shaders.js b/scripts/generate-shaders.js
index ddfdd036a3..a3246c92d9 100755
--- a/scripts/generate-shaders.js
+++ b/scripts/generate-shaders.js
@@ -136,6 +136,16 @@ const char* ${shaderName}::name = "${shaderName}";
const char* ${shaderName}::vertexSource = ${sourceOffset(key, 'vertex')};
const char* ${shaderName}::fragmentSource = ${sourceOffset(key, 'fragment')};
+// Uncompressed source of ${shaderName}.vertex.glsl:
+/*
+${shaders[key].vertexSource}
+*/
+
+// Uncompressed source of ${shaderName}.fragment.glsl:
+/*
+${shaders[key].fragmentSource}
+*/
+
} // namespace shaders
} // namespace mbgl
`);