X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fresources.cpp;h=078b58b71696559b16b12267f0e39c8759852373;hb=81c4024fb6acf37df702a803dc4efdf82a81525a;hp=045096e52dea7c31a55c872211cd781e276d3449;hpb=9072069993704481d93b71add1f1ecda1009ae88;p=libs%2Fgltk.git diff --git a/source/resources.cpp b/source/resources.cpp index 045096e..078b58b 100644 --- a/source/resources.cpp +++ b/source/resources.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include "resources.h" using namespace std; @@ -6,15 +8,32 @@ using namespace std; namespace Msp { namespace GLtk { -Resources::Resources(): - default_font(0) +Resources::Resources() { 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