93 std::vector<ShaderParam> parameters,
94 std::vector<ShaderProgram> programs
99 std::vector<ShaderParam> parameters,
101 std::string post_fix=
"" 118 std::string program()
const;
121 void set_program(std::string name)
const;
124 Dict parameters()
const;
127 void set_parameters(
const Dict& parameters)
const;
130 void set_expressions(
const Dict& expressions)
const;
136 Shader(std::shared_ptr<Impl> impl) { _impl=std::move(impl); }
static const Shader default_value
The default value.
Definition: Shader.h:133
MAQUINA_EXPORT void add_shader_glsl(const std::string_view &code)
Type type
The program type.
Definition: Shader.h:79
A raw OpenGL fragment program.
Definition: Shader.h:75
A raw OpenGL geometry program.
Definition: Shader.h:73
std::string name
The texture slot name.
Definition: Shader.h:64
A shader texture slot descriptor.
Definition: Shader.h:62
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
std::string decl_code
The GLSL declaration code (for SurfaceFragment)
Definition: Shader.h:80
Type
Definition: Shader.h:71
MAQUINA_EXPORT Value default_value(const maquina::StringView &type_name)
Return the default value of a type.
MAQUINA_EXPORT void register_shading_node(std::string name, std::vector< ShaderParam > parameters, ShaderParamType output_type, std::string post_fix="")
ShaderParamType type
The parameter type (computed by the constructor)
Definition: Shader.h:58
bool color_managed
true if the texture data are color managed (colors), false if the texture data are not color managed ...
Definition: Shader.h:65
MAQUINA_EXPORT void register_shading_token(const std::string &s, int token)
Gather shading parameters.
Definition: Shader.h:109
#define MAQUINA_EXPORT
Definition: Export.h:31
std::string name
The parameter's name.
Definition: Shader.h:55
MAQUINA_EXPORT std::string preprocess_shader_code(std::string code)
A shader parameter descriptor.
Definition: Shader.h:39
ShaderParamType
The shader parameter types.
Definition: Shader.h:19
std::string code
The GLSL program code.
Definition: Shader.h:78
A shader texture slot descriptor.
Definition: Shader.h:69
A simplified OpenGL surface fragment program.
Definition: Shader.h:76
A dictionnary to associate strings to values.
Definition: Dict.h:24
MAQUINA_EXPORT void register_shader(std::string name, bool stream, std::vector< ShaderParam > parameters, std::vector< ShaderProgram > programs)
Register a new hardware shader.
A raw OpenGL vertex program.
Definition: Shader.h:74
Base class of all Rumba values.
Definition: Value.h:34
Value default_value
The parameter's default value if not provided in the shader instance.
Definition: Shader.h:56