X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fresources.cpp;h=078b58b71696559b16b12267f0e39c8759852373;hb=81c4024fb6acf37df702a803dc4efdf82a81525a;hp=7415beb5473312e57fcabb29d6691114aa733fc1;hpb=0af3c2393bd00f39db3bfaf5b78a7a44f0fd5ff1;p=libs%2Fgltk.git diff --git a/source/resources.cpp b/source/resources.cpp index 7415beb..078b58b 100644 --- a/source/resources.cpp +++ b/source/resources.cpp @@ -1,11 +1,6 @@ -/* $Id$ - -This file is part of libmspgltk -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include +#include +#include +#include #include "resources.h" using namespace std; @@ -13,45 +8,97 @@ using namespace std; namespace Msp { namespace GLtk { -Resources::Resources(): - path("."), - default_font(0) +Resources::Resources() +{ + 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