1 #ifndef MSP_GLTK_RESOURCES_H_
2 #define MSP_GLTK_RESOURCES_H_
4 #include <msp/gl/font.h>
5 #include <msp/gl/module.h>
6 #include <msp/gl/program.h>
7 #include <msp/gl/sampler.h>
8 #include <msp/gl/texture.h>
9 #include <msp/datafile/collection.h>
10 #include <msp/datafile/directorysource.h>
11 #include <msp/fs/path.h>
13 #include "mspgltk_api.h"
20 Stores resources such as styles and graphics. The Root widget requires a
21 Resources instance as constructor parameter.
23 class MSPGLTK_API Resources: public DataFile::Collection
26 class Loader: public Collection::Loader
35 void default_font(const std::string &);
36 void font(const std::string &);
41 GL::Font *default_font = nullptr;
42 DataFile::DirectorySource *dir_src = nullptr;
46 Resources(const FS::Path &);
49 const GL::Font &get_default_font() const;
50 const GL::Sampler &get_default_sampler() const;
53 GL::Module *create_module(const std::string &);
54 GL::Program *create_program(const std::string &);
55 GL::Sampler *create_sampler(const std::string &);
56 GL::Texture2D *create_texture(const std::string &);