13#ifndef SO_UNIFORM_PARAMETER_BASE_H
14#define SO_UNIFORM_PARAMETER_BASE_H
20#include <Inventor/SbString.h>
24# pragma warning( push )
25# pragma warning( disable : 4100 )
45 virtual void set1f(
const SbString & ,
const float ) {}
46 virtual void set2f(
const SbString & ,
const float * ) {}
47 virtual void set3f(
const SbString & ,
const float * ) {}
48 virtual void set4f(
const SbString & ,
const float * ) {}
49 virtual void set2f(
const SbString & ,
const float ,
const float ) {}
50 virtual void set3f(
const SbString & ,
const float ,
const float ,
const float ) {}
51 virtual void set4f(
const SbString & ,
const float ,
const float ,
const float ,
const float ) {}
53 virtual void set1fv(
const SbString & ,
const int ,
const float * ) {}
54 virtual void set2fv(
const SbString & ,
const int ,
const float * ) {}
55 virtual void set3fv(
const SbString & ,
const int ,
const float * ) {}
56 virtual void set4fv(
const SbString & ,
const int ,
const float * ) {}
58 virtual void set1i(
const SbString & ,
const int32_t ) {}
59 virtual void set2i(
const SbString & ,
const int32_t * ) {}
60 virtual void set2i(
const SbString & ,
const SbVec2s & ) {}
61 virtual void set3i(
const SbString & ,
const int32_t * ) {}
62 virtual void set3i(
const SbString & ,
const SbVec3s & ) {}
63 virtual void set4i(
const SbString & ,
const int32_t * ) {}
65 virtual void setMatrix3f(
const SbString & name,
const float * values, SbBool transpose = FALSE) { setMatrix3fv(name, 1, values, transpose); }
66 virtual void setMatrix4f(
const SbString & name,
const float * values, SbBool transpose = FALSE) { setMatrix4fv(name, 1, values, transpose); }
67 virtual void setMatrix3fv(
const SbString & ,
int ,
const float * , SbBool = FALSE) {}
68 virtual void setMatrix4fv(
const SbString & ,
int ,
const float * , SbBool = FALSE) {}
88 void set1f(
const SbString &name,
const float value)
override;
89 void set2f(
const SbString &name,
const float *value)
override;
90 void set3f(
const SbString &name,
const float *value)
override;
91 void set4f(
const SbString &name,
const float *value)
override;
92 void set2f(
const SbString &name,
const float value0,
const float value1)
override;
93 void set3f(
const SbString &name,
const float value0,
const float value1,
const float value2)
override;
94 void set4f(
const SbString &name,
const float value0,
const float value1,
const float value2,
const float value3)
override;
96 void set1fv(
const SbString &name,
const int num,
const float *value)
override;
97 void set2fv(
const SbString &name,
const int num,
const float *value)
override;
98 void set3fv(
const SbString &name,
const int num,
const float *value)
override;
99 void set4fv(
const SbString &name,
const int num,
const float *value)
override;
101 void set1i(
const SbString &name,
const int32_t value)
override;
102 void set2i(
const SbString &name,
const int32_t *value)
override;
103 void set2i(
const SbString &name,
const SbVec2s &value)
override;
104 void set3i(
const SbString &name,
const int32_t *value)
override;
105 void set3i(
const SbString &name,
const SbVec3s &value)
override;
106 void set4i(
const SbString &name,
const int32_t *value)
override;
108 void setMatrix3fv(
const SbString &name,
int num,
const float *value, SbBool transpose = FALSE)
override;
109 void setMatrix4fv(
const SbString &name,
int num,
const float *value, SbBool transpose = FALSE)
override;
113 const std::vector<ml::OpenGL::TypeInfo>&
getUniforms()
const {
return _uniforms; }
116 std::vector<ml::OpenGL::TypeInfo> _uniforms;
121# pragma warning( pop )
#define INVENTOR_SHADER_API
Define class export specifier.
A helper class that collects uniforms instead of setting them to a shader.
void set4fv(const SbString &name, const int num, const float *value) override
void set3fv(const SbString &name, const int num, const float *value) override
void set3f(const SbString &name, const float value0, const float value1, const float value2) override
const std::vector< ml::OpenGL::TypeInfo > & getUniforms() const
void set2f(const SbString &name, const float value0, const float value1) override
void set3i(const SbString &name, const SbVec3s &value) override
void set2i(const SbString &name, const SbVec2s &value) override
void set1f(const SbString &name, const float value) override
void set2fv(const SbString &name, const int num, const float *value) override
void setSamplerInfo(const SbString &name, SamplerType type, uint32_t texId) override
void set4f(const SbString &name, const float *value) override
void setMatrix3fv(const SbString &name, int num, const float *value, SbBool transpose=FALSE) override
void setMatrix4fv(const SbString &name, int num, const float *value, SbBool transpose=FALSE) override
void set1i(const SbString &name, const int32_t value) override
void set3f(const SbString &name, const float *value) override
void set4f(const SbString &name, const float value0, const float value1, const float value2, const float value3) override
void set3i(const SbString &name, const int32_t *value) override
void set1fv(const SbString &name, const int num, const float *value) override
void set2i(const SbString &name, const int32_t *value) override
void set4i(const SbString &name, const int32_t *value) override
void set2f(const SbString &name, const float *value) override