added a few scene options to the scene_options map for Scene to deal with
git-svn-id: svn://anubis/fart/trunk@22 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
f143245c53
commit
5c9857e9a1
@ -4,6 +4,8 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
#include <string>
|
||||||
|
#include <map>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
void usage(const char * progname)
|
void usage(const char * progname)
|
||||||
@ -22,6 +24,7 @@ int main(int argc, char * argv[])
|
|||||||
{
|
{
|
||||||
int opt;
|
int opt;
|
||||||
int option_index;
|
int option_index;
|
||||||
|
map<string, char *> scene_options;
|
||||||
|
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
{ "output-file", required_argument, NULL, 'o' },
|
{ "output-file", required_argument, NULL, 'o' },
|
||||||
@ -38,14 +41,19 @@ int main(int argc, char * argv[])
|
|||||||
switch (opt)
|
switch (opt)
|
||||||
{
|
{
|
||||||
case 'o':
|
case 'o':
|
||||||
|
scene_options["output-file"] = optarg;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
|
scene_options["width"] = optarg;
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
|
scene_options["height"] = optarg;
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
|
scene_options["multisample"] = optarg;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
|
scene_options["verbose"] = optarg;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user