#include "camera.h"
#include "font.h"
#include "keyframe.h"
+#include "light.h"
#include "lighting.h"
#include "material.h"
#include "mesh.h"
add_type<Camera>().keyword("camera");
add_type<Font>().keyword("font");
add_type<KeyFrame>().suffix(".kframe").keyword("keyframe");
+ add_type<Light>().keyword("light");
add_type<Lighting>().suffix(".lightn").keyword("lighting");
add_type<Material>().suffix(".mat").creator(&Resources::create_material);
add_type<Mesh>().keyword("mesh").creator(&Resources::create_mesh);
return module.release();
}
}
+ else if(ext==".spv")
+ {
+ if((io = open_raw(FS::basepart(name)+".glsl")))
+ {
+ RefPtr<SpirVModule> module = new SpirVModule;
+ module->load_source(*io, this, name);
+ return module.release();
+ }
+ }
return 0;
}
return 0;
}
+
+Resources::Loader::Loader(Resources &r):
+ DerivedObjectLoader<Resources, Collection::Loader>(r)
+{
+ add("scene", &Loader::scene);
+}
+
+void Resources::Loader::scene(const string &name)
+{
+ Scene::GenericLoader ldr(obj);
+ load_sub_with(ldr);
+ obj.add(name, ldr.get_scene());
+}
+
} // namespace GL
} // namespace Msp