Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
6dc79cf1
Commit
6dc79cf1
authored
Jul 01, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Headers are regenerated only if shaders' source code was modified.
parent
9e4fe8b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
make_shader_src_h.sh
common/gal/opengl/make_shader_src_h.sh
+14
-0
No files found.
common/gal/opengl/make_shader_src_h.sh
View file @
6dc79cf1
...
@@ -8,6 +8,20 @@ SHADER_SRC=( "shader.vert" "shader.frag" )
...
@@ -8,6 +8,20 @@ SHADER_SRC=( "shader.vert" "shader.frag" )
# Number of shaders
# Number of shaders
SHADERS_NUMBER
=
${#
SHADER_SRC
[@]
}
SHADERS_NUMBER
=
${#
SHADER_SRC
[@]
}
OUTPUT
=
"shader_src.h"
OUTPUT
=
"shader_src.h"
UPDATE
=
false
# Check if it is necessary to regenerate headers
for
filename
in
"
${
SHADER_SRC
[@]
}
"
do
if
[[
$filename
-nt
$OUTPUT
]]
;
then
UPDATE
=
true
fi
done
if
[[
$UPDATE
==
false
]]
;
then
echo
"Headers are up-to-date."
exit
fi
# Prepare GLSL source to be included in C array
# Prepare GLSL source to be included in C array
function
processSrc
{
function
processSrc
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment