glsl_to_include.sh
来自「QT 开发环境里面一个很重要的文件」· Shell 代码 · 共 33 行
SH
33 行
#! /bin/sh# Compile a .glsl file to a file that can be included in a C++ programUSAGE="Usage: $0 <file.glsl>"CGC=cgcif test $# -ne 1then echo $USAGE exit 1fiGLSL_FILE=$1FRAG_FILE=`basename $1 .glsl`.fragGLSL_INC_FILE=`basename $1 .glsl`.glsl_quotedecho "// Generated by src/opengl/util/$0 from $1" > $FRAG_FILE$CGC -quiet -oglsl -profile arbfp1 $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_FILEecho "// Generated by src/opengl/util/$0 from $1" > $GLSL_INC_FILEcat $GLSL_FILE | while read linedo printf \"%s\\\\n\"\\n "$line" >> $GLSL_INC_FILEdoneecho "; // Generated by src/opengl/util/$0 from $1" >> $GLSL_INC_FILE
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?