16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 04:39:18 +02:00

CI shader validation

This commit is contained in:
milek7
2021-01-21 15:44:21 +01:00
parent 3a3104a521
commit 56eba08a6f
10 changed files with 223 additions and 54 deletions

View File

@@ -3,6 +3,7 @@
#include <string>
#include <vector>
#include <functional>
#include <unordered_map>
#include "object.h"
#include "bindable.h"
@@ -17,6 +18,9 @@ namespace gl
class shader : public object
{
public:
#ifdef SHADERVALIDATOR_STANDALONE
shader() = default;
#endif
shader(const std::string &filename);
~shader();
@@ -60,10 +64,12 @@ namespace gl
std::unordered_map<std::string, param_entry> param_conf;
std::string name;
#ifndef SHADERVALIDATOR_STANDALONE
private:
void process_source(std::string &str);
#endif
std::pair<GLuint, std::string> process_source(const std::string &filename, const std::string &basedir);
void expand_includes(std::string &str);
void expand_includes(std::string &str, const std::string &basedir);
void parse_texture_entries(std::string &str);
void parse_param_entries(std::string &str);