gz/rendering/ShaderParam.hh
Go to the documentation of this file.
46 PARAM_NONE = 0,
49 PARAM_FLOAT = 1,
52 PARAM_INT = 2,
55 PARAM_FLOAT_BUFFER = 3,
58 PARAM_INT_BUFFER = 4,
61 PARAM_TEXTURE = 5,
64 PARAM_TEXTURE_CUBE = 6,
a variant type that holds params that can be passed to a shader
Definition: gz/rendering/ShaderParam.hh:42
uint32_t Count() const
Get the element count of this parameter's buffer.
void SetTexture(const std::string &_value, ShaderParam::ParamType _type=ShaderParam::ParamType::PARAM_TEXTURE, uint32_t _uvSetIndex=0u)
Set this to be a texture parameter.
void UpdateBuffer(int *_intBuffer)
Copy a buffer to this parameter.
bool Value(int *_value) const
Get the value of this parameter if it is an int.
bool Value(std::string &_value, uint32_t &_uvSetIndex) const
Get the value of this parameter if it is a texture.
void InitializeBuffer(uint32_t _count)
Set this to be a buffer parameter.
void UpdateBuffer(float *_floatBuffer)
Copy a buffer to this parameter.
bool Buffer(std::shared_ptr< void > &_buffer) const
Get the value of this parameter if it is a buffer.
void operator=(const float _value)
Set this to be a float parameter.
void operator=(const int _value)
Set this to be an integer parameter.
bool Value(float *_value) const
Get the value of this parameter if it is a float.
ShaderParam & operator=(const ShaderParam &_other)
Set from another ShaderParam.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING