|
Castor3D
..
|
Shader variable representation. More...
Inheritance diagram for Castor3D::FrameVariable:
Collaboration diagram for Castor3D::FrameVariable:Classes | |
| class | TextLoader |
| FrameVariable loader. More... | |
Public Member Functions | |
| C3D_API | FrameVariable (ShaderProgram *p_program) |
| Constructor. More... | |
| C3D_API | FrameVariable (ShaderProgram *p_program, uint32_t p_occurences) |
| Constructor. More... | |
| C3D_API | FrameVariable (FrameVariable const &p_object) |
| Copy constructor. More... | |
| C3D_API | FrameVariable (FrameVariable &&p_object) |
| Move constructor. More... | |
| C3D_API FrameVariable & | operator= (FrameVariable const &p_object) |
| Copy assignment operator. More... | |
| C3D_API FrameVariable & | operator= (FrameVariable &&p_object) |
| Move assignment operator. More... | |
| virtual C3D_API | ~FrameVariable () |
| Destructor. More... | |
| virtual C3D_API bool | Initialise ()=0 |
| Initialises the variable. More... | |
| virtual C3D_API void | Cleanup ()=0 |
| Cleans up the variable. More... | |
| virtual C3D_API void | Bind ()=0 |
| Binds this variable to the shader. More... | |
| virtual C3D_API void | Unbind ()=0 |
| Unbinds this variable from the shader. More... | |
| virtual C3D_API eFRAME_VARIABLE_TYPE | GetFullType () const =0 |
| Gives the variable full type. More... | |
| virtual C3D_API eVARIABLE_TYPE | GetType () const =0 |
| Gives the variable dimension. More... | |
| virtual C3D_API Castor::String | GetFullTypeName () const =0 |
| Gives the variable full type name. More... | |
| virtual C3D_API Castor::String | GetDataTypeName () const =0 |
| Gives the variable data type name. More... | |
| virtual C3D_API void | SetValueStr (Castor::String const &p_value) |
| Defines the value of the variable, from a string. More... | |
| virtual C3D_API void | SetValueStr (Castor::String const &p_value, uint32_t p_index) |
| Defines the value of the variable, from a string. More... | |
| virtual void | SetName (Castor::String const &p_name) |
| Defines the name of the variable, as it appears in the shader program. More... | |
| Castor::String | GetName () const |
| Gives the name of the variable, as it appears in the shader program. More... | |
| Castor::String | GetStrValue () const |
| Retrieves the variable string value. More... | |
| Castor::String | GetStrValue (uint32_t p_index) const |
| Retrieves the variable string value at given index. More... | |
| virtual uint8_t const *const | const_ptr () const =0 |
| Retrieves a pointer to the variable data. More... | |
| virtual uint32_t | size () const =0 |
| Retrieves the byte size of the variable. More... | |
| virtual void | link (uint8_t *p_buffer)=0 |
| Defines the buffer holding the frame variable. More... | |
| const uint32_t & | GetOccCount () const |
| Retrieves the occurences count. More... | |
| ShaderProgram * | GetProgram () const |
| Retrieves the parent program. More... | |
Protected Member Functions | |
| virtual C3D_API void | DoSetValueStr (Castor::String const &p_value, uint32_t p_index)=0 |
| Defines the value of the variable, from a string. More... | |
Protected Attributes | |
| Castor::String | m_name |
| The variable name as it appears in the shader program. More... | |
| bool | m_changed |
| Tells if the variable has changed since last execution of the shader. More... | |
| uint32_t | m_occurences |
| The array dimension if the variable represents an array. More... | |
| Castor::StringArray | m_strValue |
| The value of the variable. More... | |
| ShaderProgram * | m_program |
| The parent shader program. More... | |
Shader variable representation.
| C3D_API Castor3D::FrameVariable::FrameVariable | ( | ShaderProgram * | p_program | ) |
Constructor.
| [in] | p_program | The program |
| C3D_API Castor3D::FrameVariable::FrameVariable | ( | ShaderProgram * | p_program, |
| uint32_t | p_occurences | ||
| ) |
Constructor.
| [in] | p_program | The program |
| [in] | p_occurences | The array dimension |
| C3D_API Castor3D::FrameVariable::FrameVariable | ( | FrameVariable const & | p_object | ) |
Copy constructor.
| [in] | p_object | The object to copy |
| C3D_API Castor3D::FrameVariable::FrameVariable | ( | FrameVariable && | p_object | ) |
Move constructor.
| [in] | p_object | The object to move |
|
virtual |
Destructor.
|
pure virtual |
Binds this variable to the shader.
|
pure virtual |
Cleans up the variable.
|
pure virtual |
Retrieves a pointer to the variable data.
Implemented in Castor3D::TFrameVariable< T >.
|
protectedpure virtual |
Defines the value of the variable, from a string.
| [in] | p_index | The index of the value |
| [in] | p_value | The string containing the value |
|
pure virtual |
Gives the variable data type name.
Implemented in Castor3D::TFrameVariable< T >.
|
pure virtual |
Gives the variable full type.
Donne le type complet de la variable
Implemented in Castor3D::OneFrameVariable< T >, Castor3D::MatrixFrameVariable< T, Rows, Columns >, and Castor3D::PointFrameVariable< T, Count >.
|
pure virtual |
Gives the variable full type name.
Donne le nom du type complet de la variable
Implemented in Castor3D::OneFrameVariable< T >, Castor3D::MatrixFrameVariable< T, Rows, Columns >, and Castor3D::PointFrameVariable< T, Count >.
|
inline |
Gives the name of the variable, as it appears in the shader program.
References m_name.
|
inline |
|
inline |
|
inline |
|
inline |
Retrieves the variable string value at given index.
| [in] | p_index | The index |
References m_occurences, and m_strValue.
|
pure virtual |
Gives the variable dimension.
Donne la dimension de la variable
Implemented in Castor3D::OneFrameVariable< T >, Castor3D::MatrixFrameVariable< T, Rows, Columns >, and Castor3D::PointFrameVariable< T, Count >.
|
pure virtual |
Initialises the variable.
false if any problem occured
|
pure virtual |
Defines the buffer holding the frame variable.
| [in] | p_buffer | The buffer |
Implemented in Castor3D::TFrameVariable< T >, and Castor3D::MatrixFrameVariable< T, Rows, Columns >.
| C3D_API FrameVariable& Castor3D::FrameVariable::operator= | ( | FrameVariable const & | p_object | ) |
Copy assignment operator.
| [in] | p_object | The object to copy |
| C3D_API FrameVariable& Castor3D::FrameVariable::operator= | ( | FrameVariable && | p_object | ) |
Move assignment operator.
| [in] | p_object | The object to move |
|
inlinevirtual |
Defines the name of the variable, as it appears in the shader program.
| [in] | p_name | The variable name |
References m_name.
|
virtual |
Defines the value of the variable, from a string.
| [in] | p_value | The string containing the value |
|
virtual |
Defines the value of the variable, from a string.
| [in] | p_index | The index of the value |
| [in] | p_value | The string containing the value |
|
pure virtual |
Retrieves the byte size of the variable.
Implemented in Castor3D::OneFrameVariable< T >, Castor3D::PointFrameVariable< T, Count >, and Castor3D::MatrixFrameVariable< T, Rows, Columns >.
|
pure virtual |
Unbinds this variable from the shader.
|
protected |
Tells if the variable has changed since last execution of the shader.
|
protected |
|
protected |
The array dimension if the variable represents an array.
Referenced by GetOccCount(), and GetStrValue().
|
protected |
The parent shader program.
Referenced by GetProgram().
|
protected |
The value of the variable.
Referenced by GetStrValue().
1.8.15