updated main/Scene to accept std::map of parameters
git-svn-id: svn://anubis/fart/trunk@23 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
5c9857e9a1
commit
959219ffb8
@ -1,5 +1,24 @@
|
||||
|
||||
#include "Scene.h"
|
||||
#include <string>
|
||||
#include <map>
|
||||
using namespace std;
|
||||
|
||||
Scene::Scene(map<string, const char *> options,
|
||||
const char * filename)
|
||||
{
|
||||
m_width = 800;
|
||||
m_height = 600;
|
||||
m_multisample_level = 1;
|
||||
m_output_file_name = "fart.bmp";
|
||||
m_verbose = false;
|
||||
|
||||
load(filename);
|
||||
}
|
||||
|
||||
void Scene::load(const char * filename)
|
||||
{
|
||||
}
|
||||
|
||||
void Scene::render()
|
||||
{
|
||||
|
12
main/Scene.h
12
main/Scene.h
@ -2,12 +2,24 @@
|
||||
#ifndef SCENE_H
|
||||
#define SCENE_H SCENE_H
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
class Scene
|
||||
{
|
||||
public:
|
||||
Scene(std::map<std::string, const char *> options,
|
||||
const char * filename);
|
||||
void render();
|
||||
|
||||
private:
|
||||
void load(const char * filename);
|
||||
|
||||
int m_width;
|
||||
int m_height;
|
||||
int m_multisample_level;
|
||||
std::string m_output_file_name;
|
||||
bool m_verbose;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -24,7 +24,7 @@ int main(int argc, char * argv[])
|
||||
{
|
||||
int opt;
|
||||
int option_index;
|
||||
map<string, char *> scene_options;
|
||||
map<string, const char *> scene_options;
|
||||
|
||||
static const struct option long_options[] = {
|
||||
{ "output-file", required_argument, NULL, 'o' },
|
||||
|
Loading…
x
Reference in New Issue
Block a user