The XSI_RTS_Uniform object defines a special parameter for a Realtime Shader chain.
A uniform parameter is a value that is defined by the Realtime Shader but intended to be used inside a vertex or a fragment shader. For example, a real-time shader node can use this method to define a single float parameter called foobar
. When the real-time shader node responsible for calling the vertex or fragment shader (GLSLProgram or HLSLProgram) is called, it retrieves the list of uniform parameters defined and passes them to the vertex and fragment shader.
#include <XSI_rtshaders.h>
Public Types | |
enum | eUniformType { Float = 0, Int, Texture } |
Public Member Functions | |
XSI_RTS_Uniform (eUniformType in_eType, const char *in_szName, unsigned int in_uiSize, void *in_pData) | |
virtual | ~XSI_RTS_Uniform () |
const char * | GetName () |
unsigned int | GetSize () |
eUniformType | GetType () |
void * | GetData () |
enum eUniformType |
XSI_RTS_Uniform | ( | eUniformType | in_eType, |
const char * | in_szName, | ||
unsigned int | in_uiSize, | ||
void * | in_pData | ||
) | [inline] |
Constructs an XSI_RTS_Uniform object from the specified information.
in_eType | Data type for the new uniform parameter (one of the eUniformType enum values) |
in_szName | Name for the uniform parameter |
in_uiSize | Size of the data for the uniform parameter |
in_pData | Pointer to the data to store in the uniform parameter |
virtual ~XSI_RTS_Uniform | ( | ) | [inline, virtual] |
Default destructor.
const char* GetName | ( | ) | [inline] |
Returns the name of the uniform parameter.
unsigned int GetSize | ( | ) | [inline] |
Returns the size of the data for the uniform parameter.
eUniformType GetType | ( | ) | [inline] |
Returns the data type of the uniform parameter.
void* GetData | ( | ) | [inline] |
Returns the data stored in the uniform parameter.