#include "resourcemanager.h"
#include "resources.h"
#include "sampler.h"
+#include "scene.h"
#include "technique.h"
#include "texture1d.h"
#include "texture2d.h"
add_type<Pose>().keyword("pose");
add_type<Program>().keyword("shader").creator(&Resources::create_program);
add_type<Sampler>().suffix(".samp").keyword("sampler");
+ add_type<Scene>().suffix(".scene").creator(&Resources::create_scene);
add_type<Technique>().suffix(".tech").keyword("technique");
add_type<Texture1D>().base<Texture>().suffix(".tex1d").keyword("texture1d");
add_type<Texture2D>().base<Texture>().suffix(".tex2d").suffix(".png").suffix(".jpg").keyword("texture2d").creator(&Resources::create_texture2d);
return 0;
}
+Scene *Resources::create_scene(const string &name)
+{
+ if(RefPtr<IO::Seekable> io = open_raw(name))
+ {
+ DataFile::Parser parser(*io, name);
+ Scene::GenericLoader ldr(*this);
+ ldr.load(parser);
+ return ldr.get_scene();
+ }
+
+ return 0;
+}
+
Texture2D *Resources::create_texture2d(const string &name)
{
string ext = FS::extpart(name);
class Module;
class Program;
class ResourceManager;
+class Scene;
class Texture2D;
/**
protected:
Material *create_material(const std::string &);
Mesh *create_mesh(const std::string &);
+ Scene *create_scene(const std::string &);
Texture2D *create_texture2d(const std::string &);
Module *create_module(const std::string &);
Program *create_program(const std::string &);