Castor3D  ..
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Castor3D::TFrameVariable< T > Class Template Reference

Shader variable representation with variable type. More...

+ Inheritance diagram for Castor3D::TFrameVariable< T >:
+ Collaboration diagram for Castor3D::TFrameVariable< T >:

Public Member Functions

 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...
 
TFrameVariableoperator= (TFrameVariable< T > const &p_object)
 Copy assignment operator. More...
 
TFrameVariableoperator= (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 FrameVariableoperator= (FrameVariable const &p_object)
 Copy assignment operator. More...
 
C3D_API FrameVariableoperator= (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 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 uint32_t size () const =0
 Retrieves the byte size of the variable. More...
 
const uint32_t & GetOccCount () const
 Retrieves the occurences count. More...
 
ShaderProgramGetProgram () const
 Retrieves the parent program. More...
 

Protected Types

typedef Castor::Policy< T > policy
 

Protected Member Functions

void DoCleanupBuffer ()
 
- Protected Member Functions inherited from Castor3D::FrameVariable
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

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...
 
ShaderProgramm_program
 The parent shader program. More...
 

Detailed Description

template<typename T>
class Castor3D::TFrameVariable< T >

Shader variable representation with variable type.

Author
Sylvain DOREMUS
Version
0.6.1.0
Date
14/08/2010

Member Typedef Documentation

◆ policy

template<typename T>
typedef Castor::Policy< T > Castor3D::TFrameVariable< T >::policy
protected

Constructor & Destructor Documentation

◆ TFrameVariable() [1/4]

template<typename T>
Castor3D::TFrameVariable< T >::TFrameVariable ( ShaderProgram p_program)

Constructor.

Parameters
[in]p_programThe program

◆ TFrameVariable() [2/4]

template<typename T>
Castor3D::TFrameVariable< T >::TFrameVariable ( ShaderProgram p_program,
uint32_t  p_occurences 
)

Constructor.

Parameters
[in]p_programThe program
[in]p_occurencesThe array dimension

◆ TFrameVariable() [3/4]

template<typename T>
Castor3D::TFrameVariable< T >::TFrameVariable ( TFrameVariable< T > const &  p_object)

Copy constructor.

Parameters
[in]p_objectThe object to copy

◆ TFrameVariable() [4/4]

template<typename T>
Castor3D::TFrameVariable< T >::TFrameVariable ( TFrameVariable< T > &&  p_object)

Move constructor.

Parameters
[in]p_objectThe object to move

◆ ~TFrameVariable()

template<typename T>
virtual Castor3D::TFrameVariable< T >::~TFrameVariable ( )
virtual

Destructor.

Member Function Documentation

◆ const_ptr()

template<typename T>
virtual uint8_t const* const Castor3D::TFrameVariable< T >::const_ptr ( ) const
virtual

Retrieves a pointer to the variable data.

Returns
The pointer

Implements Castor3D::FrameVariable.

◆ DoCleanupBuffer()

template<typename T>
void Castor3D::TFrameVariable< T >::DoCleanupBuffer ( )
inlineprotected

◆ GetDataTypeName()

template<typename T>
Castor::String Castor3D::TFrameVariable< T >::GetDataTypeName ( ) const
inlinevirtual

Gives the variable data type.

Returns
The data type name

Implements Castor3D::FrameVariable.

◆ link()

template<typename T>
virtual void Castor3D::TFrameVariable< T >::link ( uint8_t *  p_buffer)
virtual

Defines the buffer holding the frame variable.

Remarks
The variable no longer owns it's buffer
Parameters
[in]p_bufferThe buffer

Implements Castor3D::FrameVariable.

Reimplemented in Castor3D::MatrixFrameVariable< T, Rows, Columns >.

◆ operator=() [1/2]

template<typename T>
TFrameVariable& Castor3D::TFrameVariable< T >::operator= ( TFrameVariable< T > const &  p_object)

Copy assignment operator.

Parameters
[in]p_objectThe object to copy
Returns
A reference to this object

◆ operator=() [2/2]

template<typename T>
TFrameVariable& Castor3D::TFrameVariable< T >::operator= ( TFrameVariable< T > &&  p_object)

Move assignment operator.

Parameters
[in]p_objectThe object to move
Returns
A reference to this object

Member Data Documentation

◆ m_bOwnBuffer

template<typename T>
bool Castor3D::TFrameVariable< T >::m_bOwnBuffer
protected

Tells the variable owns it's buffer.

◆ m_values

template<typename T>
T* Castor3D::TFrameVariable< T >::m_values
protected

The documentation for this class was generated from the following file: