X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fresources%2Fresources.cpp;h=fa20a0bf2e38d5cc072908480ce0bf3a62008257;hp=32f59d93d6e5a85f0bea998fd6bc446deb3fe88f;hb=adc26a2e141a2853b6c5025130c46a46cece4b84;hpb=e6e6f0fe81a2f92985e65ae0de708974194d81a3 diff --git a/source/resources/resources.cpp b/source/resources/resources.cpp index 32f59d93..fa20a0bf 100644 --- a/source/resources/resources.cpp +++ b/source/resources/resources.cpp @@ -4,10 +4,10 @@ #include "armature.h" #include "basicmaterial.h" #include "camera.h" +#include "directionallight.h" #include "error.h" #include "font.h" #include "keyframe.h" -#include "light.h" #include "lighting.h" #include "mesh.h" #include "module.h" @@ -16,6 +16,7 @@ #include "orderedscene.h" #include "pbrmaterial.h" #include "sequencetemplate.h" +#include "pointlight.h" #include "pose.h" #include "program.h" #include "resourcemanager.h" @@ -52,9 +53,10 @@ Resources::Resources(bool set_as_global): .notify(&set_debug_name); add_type().keyword("camera") .notify(&set_debug_name); + add_type().base().suffix(".light") + .creator([this](const string &n) -> DirectionalLight * { create_generic(n); return 0; }); add_type().keyword("font"); add_type().suffix(".kframe").keyword("keyframe"); - add_type().keyword("light"); add_type().suffix(".lightn").keyword("lighting") .notify(&set_debug_name); add_type().keyword("mesh") @@ -70,6 +72,8 @@ Resources::Resources(bool set_as_global): add_type().base().suffix(".mat") .creator([this](const string &n) -> PbrMaterial * { create_generic(n); return 0; }) .notify(&set_debug_name); + add_type().base().suffix(".light") + .creator([this](const string &n) -> PointLight * { create_generic(n); return 0; }); add_type().suffix(".seq").keyword("sequence"); add_type().keyword("pose"); add_type().keyword("shader")