-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·32 lines (26 loc) · 848 Bytes
/
build.sh
File metadata and controls
executable file
·32 lines (26 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
set -e
DATOVIZ_FOLDER="../datoviz"
GLSLC_PATH=$DATOVIZ_FOLDER/bin/vulkan/linux/glslc
SHADER_DIR="shaders/"
# Compile GLSL shaders to SPIR-V.
for shader in "$SHADER_DIR"*.vert "$SHADER_DIR"*.frag; do
[ -e "$shader" ] || continue
output="${shader}.spv"
# Only compile if source is newer than the output
if [ ! -e "$output" ] || [ "$shader" -nt "$output" ]; then
echo "Compiling $shader -> $output"
"$GLSLC_PATH" "$shader" -o "$output"
if [ $? -ne 0 ]; then
echo "Error compiling $shader"
fi
# else
# echo "Skipping $shader (up to date)"
fi
done
# Compile datostim.c
gcc -I$DATOVIZ_FOLDER/include \
-I$DATOVIZ_FOLDER/build/_deps/cglm-src/include/ \
-L$DATOVIZ_FOLDER/build \
datostim.c -o datostim \
-lm -ldatoviz \
-Wl,-rpath,$DATOVIZ_FOLDER/build