]> git.tdb.fi Git - libs/demoscene.git/blob - source/resources.h
Make the default constructor of Resources protected
[libs/demoscene.git] / source / resources.h
1 #ifndef MSP_DEMOSCENE_RESOURCES_H_
2 #define MSP_DEMOSCENE_RESOURCES_H_
3
4 #include <msp/datafile/directorysource.h>
5 #include <msp/datafile/packsource.h>
6 #include <msp/gl/font.h>
7 #include <msp/gl/resources.h>
8 #include <msp/gl/technique.h>
9
10 namespace Msp {
11 namespace DemoScene {
12
13 class Resources: public Msp::GL::Resources
14 {
15 private:
16         Msp::DataFile::DirectorySource dir_source;
17         Msp::DataFile::PackSource pack_source;
18
19         const Msp::GL::Font *ui_font;
20         const Msp::GL::Technique *ui_text_technique;
21
22 protected:
23         Resources();
24 public:
25         Resources(const std::string &);
26
27 protected:
28         void init_sources(const std::string &);
29 private:
30         void init();
31         static const DataFile::CollectionSource &get_builtin_source();
32 public:
33         static Resources &get_builtins();
34
35         const Msp::GL::Font &get_ui_font() const;
36         const Msp::GL::Technique &get_ui_text_technique() const;
37         void set_ui_text_resources(const std::string &, const std::string &);
38 };
39
40 } // namespace DemoScene
41 } // namespace Msp
42
43 #endif