updated main/fart.cc a tad
git-svn-id: svn://anubis/fart/trunk@20 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
c06255abff
commit
a52733c996
13
main/fart.cc
13
main/fart.cc
@ -10,9 +10,11 @@ void usage(const char * progname)
|
|||||||
{
|
{
|
||||||
cout << "Usage: " << progname << " [options] <scene-file>" << endl;
|
cout << "Usage: " << progname << " [options] <scene-file>" << endl;
|
||||||
cout << " Options:" << endl;
|
cout << " Options:" << endl;
|
||||||
|
cout << " -o|--output-file <output-file-name>" << endl;
|
||||||
cout << " -w|--width <image-width>" << endl;
|
cout << " -w|--width <image-width>" << endl;
|
||||||
cout << " -h|--height <image-height>" << endl;
|
cout << " -h|--height <image-height>" << endl;
|
||||||
cout << " -m|--multisample <level>" << endl;
|
cout << " -m|--multisample <level>" << endl;
|
||||||
|
cout << " -v|--verbose" << endl;
|
||||||
exit(42);
|
exit(42);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,25 +24,28 @@ int main(int argc, char * argv[])
|
|||||||
int option_index;
|
int option_index;
|
||||||
|
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
|
{ "output-file", required_argument, NULL, 'o' },
|
||||||
{ "width", required_argument, NULL, 'w' },
|
{ "width", required_argument, NULL, 'w' },
|
||||||
{ "height", required_argument, NULL, 'h' },
|
{ "height", required_argument, NULL, 'h' },
|
||||||
{ "multisample", required_argument, NULL, 'm' },
|
{ "multisample", required_argument, NULL, 'm' },
|
||||||
|
{ "verbose", no_argument, NULL, 'v' },
|
||||||
{ NULL, 0, NULL, 0 }
|
{ 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)
|
long_options, &option_index)) != -1)
|
||||||
{
|
{
|
||||||
switch (opt)
|
switch (opt)
|
||||||
{
|
{
|
||||||
|
case 'o':
|
||||||
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
cout << "width: " << optarg << endl;
|
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
cout << "height: " << optarg << endl;
|
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
cout << "multisample level: " << optarg << endl;
|
break;
|
||||||
|
case 'v':
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user