updated main/fart.cc a tad

git-svn-id: svn://anubis/fart/trunk@20 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2009-01-20 21:51:03 +00:00
parent c06255abff
commit a52733c996

View File

@ -10,9 +10,11 @@ void usage(const char * progname)
{
cout << "Usage: " << progname << " [options] <scene-file>" << endl;
cout << " Options:" << endl;
cout << " -o|--output-file <output-file-name>" << endl;
cout << " -w|--width <image-width>" << endl;
cout << " -h|--height <image-height>" << endl;
cout << " -m|--multisample <level>" << endl;
cout << " -v|--verbose" << endl;
exit(42);
}
@ -22,25 +24,28 @@ int main(int argc, char * argv[])
int option_index;
static const struct option long_options[] = {
{ "output-file", required_argument, NULL, 'o' },
{ "width", required_argument, NULL, 'w' },
{ "height", required_argument, NULL, 'h' },
{ "multisample", required_argument, NULL, 'm' },
{ "verbose", no_argument, NULL, 'v' },
{ NULL, 0, NULL, 0 }
};
while ((opt = getopt_long(argc, argv, "w:h:m:",
while ((opt = getopt_long(argc, argv, "o:w:h:m:",
long_options, &option_index)) != -1)
{
switch (opt)
{
case 'o':
break;
case 'w':
cout << "width: " << optarg << endl;
break;
case 'h':
cout << "height: " << optarg << endl;
break;
case 'm':
cout << "multisample level: " << optarg << endl;
break;
case 'v':
break;
default:
usage(argv[0]);