Castor3D
..
|
Single shader variable with variable type. More...
Public Member Functions | |
OneFrameVariable (ShaderProgram *p_program) | |
Constructor. More... | |
OneFrameVariable (ShaderProgram *p_program, uint32_t p_occurences) | |
Constructor. More... | |
OneFrameVariable (OneFrameVariable< T > const &p_object) | |
Copy constructor. More... | |
OneFrameVariable (OneFrameVariable< T > &&p_object) | |
Move constructor. More... | |
OneFrameVariable & | operator= (OneFrameVariable< T > const &p_object) |
Copy assignment operator. More... | |
OneFrameVariable & | operator= (OneFrameVariable< T > &&p_object) |
Move assignment operator. More... | |
virtual | ~OneFrameVariable () |
Destructor. More... | |
T & | GetValue () |
Retrieves the value. More... | |
T const & | GetValue () const |
Retrieves the value. More... | |
T & | GetValue (uint32_t p_index) |
Retrieves the value at given index. More... | |
T const & | GetValue (uint32_t p_index) const |
Retrieves the value at given index. More... | |
void | SetValue (T const &p_value) |
Defines the value of the variable. More... | |
void | SetValue (T const &p_value, uint32_t p_index) |
Defines the value of the variable. More... | |
void | SetValues (T const *p_values, size_t p_size) |
Defines the values of the variable. More... | |
template<size_t N> | |
void | SetValues (T const (&p_values)[N]) |
Defines the values of the variable. More... | |
template<size_t N> | |
void | SetValues (std::array< T, N > const &p_values) |
Defines the values of the variable. More... | |
void | SetValues (std::vector< T > const &p_values) |
Defines the values of the variable. More... | |
virtual uint32_t | size () const |
Retrieves the byte size of the variable. More... | |
T & | operator[] (uint32_t p_index) |
Array subscript operator. More... | |
T const & | operator[] (uint32_t p_index) const |
Array subscript operator. More... | |
eVARIABLE_TYPE | GetType () const |
Retrieves the variable type. More... | |
eFRAME_VARIABLE_TYPE | GetFullType () const |
Retrieves the variable full type. More... | |
Castor::String | GetFullTypeName () const |
Gives the variable full type name. More... | |
Public Member Functions inherited from Castor3D::TFrameVariable< T > | |
TFrameVariable (ShaderProgram *p_program) | |
Constructor. More... | |
TFrameVariable (ShaderProgram *p_program, uint32_t p_occurences) | |
Constructor. More... | |
TFrameVariable (TFrameVariable< T > const &p_object) | |
Copy constructor. More... | |
TFrameVariable (TFrameVariable< T > &&p_object) | |
Move constructor. More... | |
TFrameVariable & | operator= (TFrameVariable< T > const &p_object) |
Copy assignment operator. More... | |
TFrameVariable & | operator= (TFrameVariable< T > &&p_object) |
Move assignment operator. More... | |
virtual | ~TFrameVariable () |
Destructor. More... | |
Castor::String | GetDataTypeName () const |
Gives the variable data type. More... | |
virtual uint8_t const *const | const_ptr () const |
Retrieves a pointer to the variable data. More... | |
virtual void | link (uint8_t *p_buffer) |
Defines the buffer holding the frame variable. More... | |
Public Member Functions inherited from Castor3D::FrameVariable | |
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 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... | |
const uint32_t & | GetOccCount () const |
Retrieves the occurences count. More... | |
ShaderProgram * | GetProgram () const |
Retrieves the parent program. More... | |
Static Public Member Functions | |
static eFRAME_VARIABLE_TYPE | GetFrameVariableType () |
Gives the variable full type. More... | |
static Castor::String | GetFrameVariableTypeName () |
Gives the variable full type. More... | |
static eVARIABLE_TYPE | GetVariableType () |
Gives the full type of the variable. More... | |
Protected Types | |
typedef Castor::Policy< T > | policy |
Protected Types inherited from Castor3D::TFrameVariable< T > | |
typedef Castor::Policy< T > | policy |
Additional Inherited Members | |
Protected Member Functions inherited from Castor3D::TFrameVariable< T > | |
void | DoCleanupBuffer () |
Protected Attributes inherited from Castor3D::TFrameVariable< T > | |
bool | m_bOwnBuffer |
Tells the variable owns it's buffer. More... | |
T * | m_values |
The buffer containing all values. More... | |
Protected Attributes inherited from Castor3D::FrameVariable | |
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... | |
Single shader variable with variable type.
|
protected |
Castor3D::OneFrameVariable< T >::OneFrameVariable | ( | ShaderProgram * | p_program | ) |
Constructor.
[in] | p_program | The program |
Castor3D::OneFrameVariable< T >::OneFrameVariable | ( | ShaderProgram * | p_program, |
uint32_t | p_occurences | ||
) |
Constructor.
[in] | p_program | The program |
[in] | p_occurences | The array dimension |
Castor3D::OneFrameVariable< T >::OneFrameVariable | ( | OneFrameVariable< T > const & | p_object | ) |
Copy constructor.
[in] | p_object | The object to copy |
Castor3D::OneFrameVariable< T >::OneFrameVariable | ( | OneFrameVariable< T > && | p_object | ) |
Move constructor.
[in] | p_object | The object to move |
|
virtual |
Destructor.
|
inlinestatic |
Gives the variable full type.
Donne le type complet de la variable
Referenced by Castor3D::OneFrameVariable< T >::GetFullType().
|
inlinestatic |
Gives the variable full type.
Donne le type complet de la variable
Referenced by Castor3D::OneFrameVariable< T >::GetFullTypeName().
|
inlinevirtual |
Retrieves the variable full type.
Implements Castor3D::FrameVariable.
References Castor3D::OneFrameVariable< T >::GetFrameVariableType().
|
inlinevirtual |
Gives the variable full type name.
Donne le nom du type complet de la variable
Implements Castor3D::FrameVariable.
References Castor3D::OneFrameVariable< T >::GetFrameVariableTypeName().
|
inlinevirtual |
Retrieves the variable type.
Implements Castor3D::FrameVariable.
References Castor3D::OneFrameVariable< T >::GetVariableType().
|
inline |
Retrieves the value.
|
inline |
Retrieves the value.
|
inline |
Retrieves the value at given index.
[in] | p_index | The index |
|
inline |
Retrieves the value at given index.
[in] | p_index | The index |
|
inlinestatic |
Gives the full type of the variable.
References Castor3D::eVARIABLE_TYPE_ONE.
Referenced by Castor3D::OneFrameVariable< T >::GetType().
OneFrameVariable& Castor3D::OneFrameVariable< T >::operator= | ( | OneFrameVariable< T > const & | p_object | ) |
Copy assignment operator.
[in] | p_object | The object to copy |
OneFrameVariable& Castor3D::OneFrameVariable< T >::operator= | ( | OneFrameVariable< T > && | p_object | ) |
Move assignment operator.
[in] | p_object | The object to move |
|
inline |
Array subscript operator.
[in] | p_index | The index |
References Castor3D::TFrameVariable< T >::m_values.
|
inline |
Array subscript operator.
[in] | p_index | The index |
References Castor3D::TFrameVariable< T >::m_values.
|
inline |
Defines the value of the variable.
[in] | p_value | The new value |
|
inline |
Defines the value of the variable.
[in] | p_value | The new value |
[in] | p_index | The index of the value |
|
inline |
Defines the values of the variable.
[in] | p_values | The values buffer. |
[in] | p_size | The values count. |
Referenced by Castor3D::OneFrameVariable< T >::SetValues().
|
inline |
Defines the values of the variable.
[in] | p_values | The values buffer. |
References Castor3D::OneFrameVariable< T >::SetValues().
|
inline |
Defines the values of the variable.
[in] | p_values | The values buffer. |
References Castor3D::OneFrameVariable< T >::SetValues().
|
inline |
Defines the values of the variable.
[in] | p_values | The values buffer. |
References Castor3D::OneFrameVariable< T >::SetValues().
|
virtual |