X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fresources.cpp;h=b8eec774387ea94233c6aa0223095199042ea12e;hp=db01b30badee3eca568eb5e11d5062b03c79670e;hb=679f0fd1f3504b5536f18943e188606887f3785c;hpb=34a4efa81946066d32c1374318dcc0b74ae486a9 diff --git a/source/resources.cpp b/source/resources.cpp index db01b30b..b8eec774 100644 --- a/source/resources.cpp +++ b/source/resources.cpp @@ -2,11 +2,14 @@ #include #include "animation.h" #include "armature.h" +#include "camera.h" #include "font.h" #include "keyframe.h" +#include "lighting.h" #include "material.h" #include "mesh.h" #include "object.h" +#include "pipelinetemplate.h" #include "pose.h" #include "program.h" #include "programcompiler.h" @@ -32,11 +35,14 @@ Resources::Resources(): { add_type().suffix(".anim").keyword("animation"); add_type().suffix(".arma").keyword("armature"); + add_type().keyword("camera"); add_type().keyword("font"); add_type().suffix(".kframe").keyword("keyframe"); + add_type().suffix(".lightn").keyword("lighting"); add_type().suffix(".mat").keyword("material"); add_type().keyword("mesh").creator(&Resources::create_mesh); add_type().keyword("object"); + add_type().suffix(".pipe").keyword("pipeline"); add_type().keyword("pose"); add_type().keyword("shader").suffix(".glsl").creator(&Resources::create_program); add_type().suffix(".tech").keyword("technique"); @@ -85,7 +91,7 @@ Mesh *Resources::create_mesh(const string &name) if(RefPtr io = open_from_sources(name)) { - RefPtr mesh = new GL::Mesh(resource_manager); + RefPtr mesh = new Mesh(resource_manager); resource_manager->set_resource_location(*mesh, *this, name); return mesh.release(); } @@ -105,7 +111,7 @@ Texture2D *Resources::create_texture2d(const string &name) if(!resource_manager) image.load_io(*io); - RefPtr tex = new GL::Texture2D(resource_manager); + RefPtr tex = new Texture2D(resource_manager); if(is_mipmapped(default_tex_filter)) { @@ -135,7 +141,7 @@ Program *Resources::create_program(const string &name) if(RefPtr io = open_from_sources(name)) { ProgramCompiler compiler; - compiler.compile(*io, this); + compiler.compile(*io, this, name); RefPtr program = new Program; compiler.add_shaders(*program); program->link();