]> git.tdb.fi Git - libs/demoscene.git/blob - source/resources.h
Add a builtin resource collection for storing necessary data
[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         Resources();
23 public:
24         Resources(const std::string &);
25
26 private:
27         static const DataFile::CollectionSource &get_builtin_source();
28 public:
29         static Resources &get_builtins();
30
31         const Msp::GL::Font &get_ui_font() const;
32         const Msp::GL::Technique &get_ui_text_technique() const;
33         void set_ui_text_resources(const std::string &, const std::string &);
34 };
35
36 } // namespace DemoScene
37 } // namespace Msp
38
39 #endif