X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fresources.cpp;h=06fa44cf0c502867a1ecb255bea5de9251cc6314;hb=6deafc9f236b90175a303944815f7c0eac1c95c1;hp=36be79e7914272d76a30c4c5af904c8fa5dc6cee;hpb=e5da6bc3e1f32342e661893fbb3c1cf873422c2e;p=libs%2Fgltk.git diff --git a/source/resources.cpp b/source/resources.cpp index 36be79e..06fa44c 100644 --- a/source/resources.cpp +++ b/source/resources.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include "resources.h" using namespace std; @@ -27,7 +29,10 @@ void Resources::init() default_font = 0; dir_src = 0; add_type().keyword("graphic"); - add_type().keyword("texture").creator(&Resources::create_texture); + add_type().creator([this](const string &n){ return create_module(n); }); + add_type().creator([this](const string &n){ return create_sampler(n); }); + add_type().creator([this](const string &n){ return create_program(n); }); + add_type().keyword("texture").creator([this](const string &n){ return create_texture(n); }); add_type().keyword("font"); add_type