+
+flags="-ggdb3 -Wall -fsanitize=address"
+
+while (( "$#" )); do
+ case $1 in
+ -r|--release)
+ flags="-Wall -O3"
+ echo "Release mode"
+ ;;
+ *)
+ echo "Unkown param: $1"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
mkdir -p ext
-echo gcc -ggdb3 -Wall -fsanitize=address -rdynamic csRadar.c -o csRadar -lm -ldl
-gcc -ggdb3 -Wall -fsanitize=address -rdynamic csRadar.c -o csRadar -lm -ldl
+echo build: csRadar
+gcc $flags -rdynamic csRadar.c -o csRadar -lm -ldl
-echo -ggdb3 -Wall -fsanitize=address -fpic -shared -o ext/csRadarFree.so ext_csr_free.c -lm
-gcc -ggdb3 -Wall -fsanitize=address -fpic -shared -o ext/csRadarFree.so ext_csr_free.c -lm
+echo build: ext/csRadarFree.so
+gcc $flags -fpic -shared -o ext/csRadarFree.so ext_csr_free.c -lm
" -g <gameinfo.txt path> Required if you are loading models\n"
" -r 1024 Output resolution\n"
" -o <output> Specify output name/path\n"
+ " -e <classname> Same as default arg, but instead filters for entity class\n"
" --padding=128 When cropping radar, add padding units to border\n"
//" --standard-layers Use standard TAR layers/groups\n"
" --write-normals Enable normals as an output stream\n"
char vmf_name[ 128 ]; // Just the base name eg. my_map
EMSAA sampling_mode;
+ int write_normals;
+ int write_origins;
+
// Main API interface
vmf_map *map;
csr_target target;
{
if( !csr_init( api ) )
return;
+
+ // Setup shader variants
+ if( api->write_origins )
+ {
+ // Use origin fragment variant
+ }
+
+ if( api->write_normals )
+ {
+ // Increase stride
+ }
csr_create_target( &api->target, api->resolution, api->resolution, api->sampling_mode, &shader_gbuffer );
csr_rt_clear( &api->target );