glsl_to_include.sh

来自「奇趣公司比较新的qt/emd版本」· Shell 代码 · 共 34 行

SH
34
字号
#! /bin/sh# Compile a .glsl file to a file that can be included in a C++ programUSAGE="Usage: $0 <file.glsl>"CGC=cgcCGC_PROFILE=arbfp1if test $# -ne 1then    echo $USAGE    exit 1fiGLSL_FILE=$1FRAG_FILE=`basename $1 .glsl`.frag#GLSL_INC_FILE=`basename $1 .glsl`.glsl_quotedecho "// Generated by src/opengl/util/$0 from $1" > $FRAG_FILE$CGC -quiet -oglsl -profile $CGC_PROFILE $GLSL_FILE | while read linedo   if test `echo $line | cut -c1` != "#"   then      echo -e \"$line\" >> $FRAG_FILE   fidoneecho "; // Generated by src/opengl/util/$0 from $1" >> $FRAG_FILE#echo "// Generated by src/opengl/util/$0 from $1" > $GLSL_INC_FILE#cat $GLSL_FILE | while read line#do#      printf \"%s\\\\n\"\\n "$line" >> $GLSL_INC_FILE#done#echo "; // Generated by src/opengl/util/$0 from $1" >> $GLSL_INC_FILE

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?