X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fresources.cpp;h=3cfd8306275cb5e0ae47268e4dd013749531d310;hb=9f38197854e699a6093a906ab43f4238f3cd2388;hp=01426a20ced22d8911c587ab21338201c8d02c1d;hpb=1a6d9006d0a85d8b8266266a4fc5e135f07448ae;p=libs%2Fgltk.git diff --git a/source/resources.cpp b/source/resources.cpp index 01426a2..3cfd830 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