]> git.tdb.fi Git - libs/gl.git/blob - source/core/module.h
Always show shader compiler diagnostics in debug builds
[libs/gl.git] / source / core / module.h
1 #ifndef MSP_GL_MODULE_H_
2 #define MSP_GL_MODULE_H_
3
4 #include <string>
5 #include <msp/io/base.h>
6 #include "glsl/compiler.h"
7 #include "glsl/sourcemap.h"
8
9 namespace Msp {
10 namespace GL {
11
12 class Resources;
13
14 class Module
15 {
16 private:
17         std::string prepared_source;
18         SL::SourceMap source_map;
19
20 public:
21         Module();
22
23         void set_source(const std::string &);
24         void load_source(IO::Base &, Resources *, const std::string &);
25         void load_source(IO::Base &, const std::string &);
26 private:
27         void compile(SL::Compiler &);
28
29 public:
30         const std::string &get_prepared_source() const { return prepared_source; }
31         const SL::SourceMap &get_source_map() const { return source_map; }
32 };
33
34 } // namespace GL
35 } // namespace Msp
36
37 #endif