Noise Modeler Library  0.1
Library for procedurally generating noise-based terrains and other content
 All Classes Files Functions Variables Enumerations Enumerator Groups Pages
glslgenerator.hpp
1 #ifndef NM_GLSLGENERATOR_HPP
2 #define NM_GLSLGENERATOR_HPP
3 
4 #include <nmlib/model.hpp>
5 #include <nmlib/codegeneration/inlinegenerator.hpp>
6 
7 namespace nm {
8 namespace glsl {
9 
15 {
16 public:
17  static std::string compileToGlslFunction(const InputLink& inputLink, const OutputLink &outputLink, std::string name);
18  static std::string compileToGlslFunction(std::vector<const InputLink*> inputLinks, std::vector<const OutputLink*> outputLink, std::string name);
19  static std::string compileToGlslFunctionWithDependencies(const Module &module);
20  static std::string compileToGlslFunctionWithoutDependencies(const Module &module);
21 
22 private:
23  GlslGenerator();
24 
25 protected:
26  virtual void genTypeKeyword(const SignalType &signalType, std::ostream &out) override;
27  virtual std::unique_ptr<nm::ModuleGenerator> getModuleGenerator(const Module &module) override;
28 };
29 
30 } // namespace glsl
31 } // namespace nm
32 
33 #endif // NM_GLSLGENERATOR_HPP
An instantiated ModuleType. A node in a function graph.
Definition: module.hpp:40
Generates glsl code to evaluate function graphs using OpenGL 3.0 shaders.
Definition: glslgenerator.hpp:14
Abstract base class for code generators.
Definition: inlinegenerator.hpp:34
Describes a the dimensionality of a signal Can be extended to include other type information such as ...
Definition: signaltype.hpp:13
The model module.