- // Path handling
- if( !output_set )
- {
- strcpy( output_path, strings[0] );
- csr_stripext( output_path );
- }
-
- char *base_name;
- if( !(base_name = csr_findext( output_path, '/' ) ))
- {
- base_name = output_path;
- }
-
- strcpy( vmf_name, base_name );
-
- log_info( "output_path: '%s'\n", output_path );
- log_info( "vmf_name: '%s'\n", vmf_name );
-
- // Main
- csr_target target;
-
- csr_create_target( &target, resolution, resolution, sampling_mode );
- csr_rt_clear( &target );
-
- csr_use_program( &target, frag_gbuffer );
-
- // Compute bounds
- csr_filter filter =
- {
- .classname = NULL,
- .visgroup = NULL,
- .compute_bounds_only = 1
- };
+ strcpy( api.output_path, api.strings[0] );
+ csr_stripext( api.output_path );
+ }
+
+ char *base_name;
+ if( !(base_name = csr_findext( api.output_path, '/' ) ))
+ {
+ base_name = api.output_path;
+ }
+
+ strcpy( api.vmf_name, base_name );
+
+ log_info( "output_path: '%s'\n", api.output_path );
+ log_info( "vmf_name: '%s'\n", api.vmf_name );
+
+ api.map = vmf_init( api.strings[0] );
+ if( api.map )
+ {
+ if( !extension )
+ extension = "csRadarFree";
+
+ csr_so ext = csr_libopen( extension );