X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fsourcemap.h;fp=source%2Fglsl%2Fsourcemap.h;h=6df6418aec1c1489f1f5da4ad29e3b109b5beaf5;hb=9d798ac368bfd236a7632a3a15e51bd1112ea63d;hp=0000000000000000000000000000000000000000;hpb=af00eefb3f7da48ec4038357035980c31cbcb685;p=libs%2Fgl.git diff --git a/source/glsl/sourcemap.h b/source/glsl/sourcemap.h new file mode 100644 index 00000000..6df6418a --- /dev/null +++ b/source/glsl/sourcemap.h @@ -0,0 +1,30 @@ +#ifndef MSP_GL_SL_SOURCEMAP_H_ +#define MSP_GL_SL_SOURCEMAP_H_ + +#include +#include + +namespace Msp { +namespace GL { +namespace SL { + +class SourceMap +{ +private: + unsigned base_index; + std::vector source_names; + +public: + SourceMap(); + + void set_name(unsigned, const std::string &); + unsigned get_count() const { return base_index+source_names.size(); } + void merge_from(const SourceMap &); + std::string translate_errors(const std::string &) const; +}; + +} // namespace SL +} // namespace GL +} // namespace Msp + +#endif