renderable = load<GL::Object>(opts.renderable_name);
else if(ext==".scene")
{
- GL::SimpleScene *scene = new GL::SimpleScene;
- DataFile::load(*scene, opts.renderable_name, resources);
- renderable = scene;
+ if(FS::exists(opts.renderable_name))
+ {
+ GL::Scene::GenericLoader ldr(resources);
+ IO::BufferedFile in(opts.renderable_name);
+ DataFile::Parser parser(in, opts.renderable_name);
+ ldr.load(parser);
+ renderable = ldr.get_scene();
+ }
+ else
+ renderable = &resources.get<GL::Scene>(opts.renderable_name);
}
else
throw usage_error("Unknown renderable type");