예제 #1
0
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;
}
예제 #2
0
파일: aqsis.cpp 프로젝트: UIKit0/aqsis
// Get list of frames, as a string
std::string getFrameList()
{
	std::string frameList;
	if(g_cl_frames.size() == 2)
	{
		std::ostringstream fmt;
		fmt << g_cl_frames[0] << "-" << g_cl_frames[1];
		frameList = fmt.str();
	}
	if(!g_cl_frameList.empty())
	{
		if(!frameList.empty())
			frameList += ',';
		frameList += g_cl_frameList;
	}
	return frameList;
}
예제 #3
0
static bool checkArrays(const ArgParse::apintvec& foo,
                        const ArgParse::apfloatvec& bar,
                        const ArgParse::apstringvec& english,
                        const ArgParse::apstringvec& german)
{
	if (foo.size() != 4 || bar.size() != 4 ||
	        english.size() != 4 || german.size() != 4)
	{
		return false;
	}

	for (int i = 0; i < 4; i++)
	{
		ArgParse::apstring en, de;
		switch (i+1)
		{
				case 1:
				en = "one";
				de = "eins";
				break;
				case 2:
				en = "two";
				de = "zwei";
				break;
				case 3:
				en = "three";
				de = "drei";
				break;
				case 4:
				en = "four";
				de = "vier";
				break;
		}
		if (foo[i] != ArgParse::apint(i+1) ||
		        bar[i] != ArgParse::apfloat(i+1) ||
		        english[i] != en || german[i] != de)
		{
			return false;
		}
	}

	return true;
}