ShaderInput

class ShaderInput

This is a small container class that can hold any one of the value types that can be passed as input to a shader.

Inheritance diagram

Inheritance diagram of ShaderInput

enum AccessFlags

Used when binding texture images.

enumerator A_read = 1
enumerator A_write = 2
enumerator A_layered = 4
enum ShaderInputType
enumerator M_invalid = 0
enumerator M_texture = 1
enumerator M_nodepath = 2
enumerator M_vector = 3
enumerator M_numeric = 4
enumerator M_texture_sampler = 5
enumerator M_param = 6
enumerator M_texture_image = 7
enumerator M_buffer = 8
explicit ShaderInput(CPT_InternalName name, int priority = 0)
explicit ShaderInput(CPT_InternalName name, PyObject *value, int priority = 0)
explicit ShaderInput(CPT_InternalName name, Texture *tex, bool read, bool write, int z = -1, int n = 0, int priority = 0)
explicit ShaderInput(CPT_InternalName name, Texture *tex, SamplerState const &sampler, int priority = 0)
ShaderInput(ShaderInput const&) = default
std::size_t add_hash(std::size_t hash) const
static ShaderInput const &get_blank(void)

Returns a static ShaderInput object with name NULL, priority zero, type INVALID, and all value-fields cleared.

InternalName const *get_name(void) const
NodePath get_nodepath(void) const

Warning: no error checking is done. This will crash if get_value_type() is not M_nodepath.

int get_priority(void) const
Shader::ShaderPtrData const &get_ptr(void) const
SamplerState const &get_sampler(void) const

Warning: no error checking is done.

Texture *get_texture(void) const
int get_value_type(void) const
LVecBase4 const &get_vector(void) const