1) Shader manager: Allow to override #defines programatically

when loading a shader file.
2) Conditional compilation of environmental mapping in gouraud.fs
   using 1)
This commit is contained in:
Vojtech Bubnik 2020-12-10 13:20:18 +01:00
parent b589b9ce9c
commit 8d644fbcb6
5 changed files with 47 additions and 17 deletions

View file

@ -3,6 +3,7 @@
#include <array>
#include <string>
#include <string_view>
#include "libslic3r/Point.hpp"
@ -32,7 +33,7 @@ private:
public:
~GLShaderProgram();
bool init_from_files(const std::string& name, const ShaderFilenames& filenames);
bool init_from_files(const std::string& name, const ShaderFilenames& filenames, const std::initializer_list<std::string_view> &defines = {});
bool init_from_texts(const std::string& name, const ShaderSources& sources);
const std::string& get_name() const { return m_name; }