RtVoid PreWorld() #endif { if ( g_cl_fb ) { RiDisplay( tokenCast("aqsis"), tokenCast("framebuffer"), tokenCast("rgb"), NULL ); } else if ( !g_cl_type.empty() ) { RiDisplay( tokenCast("aqsis"), tokenCast(g_cl_type.c_str()), tokenCast(g_cl_mode.c_str()), NULL ); } else if ( !g_cl_addtype.empty() ) { RiDisplay( tokenCast("+aqsis"), tokenCast(g_cl_addtype.c_str()), tokenCast(g_cl_mode.c_str()), NULL ); } // Pass the statistics option onto Aqsis. if ( g_cl_endofframe >= 0 ) { RiOption( tokenCast("statistics"), "endofframe", &g_cl_endofframe, RI_NULL ); } // Pass the crop window onto Aqsis. if( g_cl_cropWindow.size() == 4 ) { RiCropWindow(g_cl_cropWindow[0], g_cl_cropWindow[1], g_cl_cropWindow[2], g_cl_cropWindow[3]); } // Pass in specified resolution. if(g_cl_res.size() == 2) { RiFormat(g_cl_res[0], g_cl_res[1], 1.0f); } # if ENABLE_MPDUMP // Pass the statistics option onto Aqsis. if ( g_cl_mpdump ) { RtInt enabled = 1; RiOption( "mpdump", "enabled", &enabled, RI_NULL ); } # endif // Parse all the command line options with the RIB parser. for(TqInt i = 0, end = g_cl_options.size(); i < end; ++i) { std::istringstream inStream(g_cl_options[i]); Aqsis::QGetRenderContextI()->parseRibStream(inStream, "command_line_option"); } return; }
/** \brief Feed command line options to the renderer. * * This function sends all command line options to the renderer, except those * which are set directly before the world block. */ void setupOptions() { if ( g_cl_echoapi ) Aqsis::cxxRenderContext()->addFilter("echorib"); std::string frameList = getFrameList(); if(!frameList.empty()) Aqsis::cxxRenderContext()->addFilter("framedrop", Aqsis::ParamListBuilder()("frames", frameList.c_str()) ); // Allow any command line arguments to override system/env settings Aqsis::log() << Aqsis::info << "Applying search paths provided at the command line\n"; const char* popt[1]; if(!g_cl_shader_path.empty()) { popt[0] = g_cl_shader_path.c_str(); RiOption( tokenCast("searchpath"), "shader", &popt, RI_NULL ); } if(!g_cl_archive_path.empty()) { popt[0] = g_cl_archive_path.c_str(); RiOption( tokenCast("searchpath"), "archive", &popt, RI_NULL ); } if(!g_cl_texture_path.empty()) { popt[0] = g_cl_texture_path.c_str(); RiOption( tokenCast("searchpath"), "texture", &popt, RI_NULL ); } if(!g_cl_display_path.empty()) { popt[0] = g_cl_display_path.c_str(); RiOption( tokenCast("searchpath"), "display", &popt, RI_NULL ); } if(!g_cl_procedural_path.empty()) { popt[0] = g_cl_procedural_path.c_str(); RiOption( tokenCast("searchpath"), "procedural", &popt, RI_NULL ); } RiProgressHandler( &PrintProgress ); }
/** \brief Feed command line options to the renderer. * * This function sends all command line options to the renderer, except those * which are set directly before the world block. */ void setupOptions() { if ( g_cl_echoapi ) { RtInt echoapi = 1; RiOption( tokenCast("statistics"), "echoapi", &echoapi, RI_NULL ); } // Allow any command line arguments to override system/env settings Aqsis::log() << Aqsis::info << "Applying search paths provided at the command line\n"; const char* popt[1]; if(!g_cl_shader_path.empty()) { popt[0] = g_cl_shader_path.c_str(); RiOption( tokenCast("searchpath"), "shader", &popt, RI_NULL ); } if(!g_cl_archive_path.empty()) { popt[0] = g_cl_archive_path.c_str(); RiOption( tokenCast("searchpath"), "archive", &popt, RI_NULL ); } if(!g_cl_texture_path.empty()) { popt[0] = g_cl_texture_path.c_str(); RiOption( tokenCast("searchpath"), "texture", &popt, RI_NULL ); } if(!g_cl_display_path.empty()) { popt[0] = g_cl_display_path.c_str(); RiOption( tokenCast("searchpath"), "display", &popt, RI_NULL ); } if(!g_cl_procedural_path.empty()) { popt[0] = g_cl_procedural_path.c_str(); RiOption( tokenCast("searchpath"), "procedural", &popt, RI_NULL ); } RiProgressHandler( &PrintProgress ); RiPreWorldFunction( &PreWorld ); }