main/Scene applying command-line options after loading input file
git-svn-id: svn://anubis/fart/trunk@25 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
b6008116cf
commit
5692558733
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
#include "Scene.h"
|
#include "Scene.h"
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "BMP.h"
|
#include "BMP.h"
|
||||||
@ -16,6 +17,33 @@ Scene::Scene(map<string, const char *> options,
|
|||||||
m_data = NULL;
|
m_data = NULL;
|
||||||
|
|
||||||
load(filename);
|
load(filename);
|
||||||
|
|
||||||
|
/* after loading the scene file, apply any command-line render options */
|
||||||
|
for (map<string, const char *>::iterator it = options.begin();
|
||||||
|
it != options.end();
|
||||||
|
it++)
|
||||||
|
{
|
||||||
|
if (it->first == "width")
|
||||||
|
{
|
||||||
|
m_width = atoi(it->second);
|
||||||
|
}
|
||||||
|
else if (it->first == "height")
|
||||||
|
{
|
||||||
|
m_height = atoi(it->second);
|
||||||
|
}
|
||||||
|
else if (it->first == "multisample")
|
||||||
|
{
|
||||||
|
m_multisample_level = atoi(it->second);
|
||||||
|
}
|
||||||
|
else if (it->first == "output-file")
|
||||||
|
{
|
||||||
|
m_output_file_name = it->second;
|
||||||
|
}
|
||||||
|
else if (it->first == "verbose")
|
||||||
|
{
|
||||||
|
m_verbose = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Scene::~Scene()
|
Scene::~Scene()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user