X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fresources.cpp;h=dc678a9480d74aa276039d65b5b0b5cf1c0ed8d5;hb=394e5c9969a30b604bfaf78fc05a8c2d5c98ab5b;hp=e83c1bb178e5adea2acc6525acfdc01c0b8b87f1;hpb=e5f9004b672b038e43cf2b20c3fc9327f2b55ffd;p=libs%2Fgltk.git diff --git a/source/resources.cpp b/source/resources.cpp index e83c1bb..dc678a9 100644 --- a/source/resources.cpp +++ b/source/resources.cpp @@ -1,4 +1,6 @@ #include +#include +#include #include "resources.h" using namespace std; @@ -6,59 +8,92 @@ using namespace std; namespace Msp { namespace GLtk { -Resources::Resources(): - path("."), - default_font(0) +Resources::Resources() { - init(); + add_type().keyword("graphic"); + 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