Last change
on this file since 440 was 2, checked in by Dmitry A. Kuminov, 16 years ago |
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
-
Property svn:executable
set to
*
|
File size:
829 bytes
|
Line | |
---|
1 | #! /bin/sh
|
---|
2 |
|
---|
3 | # Compile a .glsl file to a file that can be included in a C++ program
|
---|
4 | USAGE="Usage: $0 <file.glsl>"
|
---|
5 | CGC=cgc
|
---|
6 | CGC_PROFILE=arbfp1
|
---|
7 |
|
---|
8 | if test $# -ne 1
|
---|
9 | then
|
---|
10 | echo $USAGE
|
---|
11 | exit 1
|
---|
12 | fi
|
---|
13 |
|
---|
14 | GLSL_FILE=$1
|
---|
15 | FRAG_FILE=`basename $1 .glsl`.frag
|
---|
16 | #GLSL_INC_FILE=`basename $1 .glsl`.glsl_quoted
|
---|
17 |
|
---|
18 | echo "// Generated by src/opengl/util/$0 from $1" > $FRAG_FILE
|
---|
19 | $CGC -quiet -oglsl -profile $CGC_PROFILE $GLSL_FILE | while read line
|
---|
20 | do
|
---|
21 | if test `echo $line | cut -c1` != "#"
|
---|
22 | then
|
---|
23 | echo -e \"$line\" >> $FRAG_FILE
|
---|
24 | fi
|
---|
25 | done
|
---|
26 | echo "; // Generated by src/opengl/util/$0 from $1" >> $FRAG_FILE
|
---|
27 |
|
---|
28 | #echo "// Generated by src/opengl/util/$0 from $1" > $GLSL_INC_FILE
|
---|
29 | #cat $GLSL_FILE | while read line
|
---|
30 | #do
|
---|
31 | # printf \"%s\\\\n\"\\n "$line" >> $GLSL_INC_FILE
|
---|
32 | #done
|
---|
33 | #echo "; // Generated by src/opengl/util/$0 from $1" >> $GLSL_INC_FILE
|
---|
Note:
See
TracBrowser
for help on using the repository browser.