IRTSExecutionState Class Reference

The IRTSExecutionState object offers several methods to access various objects during a call to real-time shaders. More...

#include <XSI_rtshaders.h>

List of all members.

Public Member Functions

virtual XSI_RTS_SystemParams GetSystemParams ()=0
virtual CRTSStateList GetStateList ()=0
virtual void *  GetShader ()=0
virtual void *  GetShaderInstanceData ()=0
virtual void  SetShaderInstanceData (void *in_pData)=0
virtual void *  GetShaderParameters ()=0
virtual long  GetShaderUniqueID ()=0
virtual eChannel  GetChannel (int in_iBuffer)=0
virtual void *  GetMaterial ()=0
virtual void *  GetPrimitive ()=0
virtual void *  GetCamera ()=0
virtual bool  DefineUniform (XSI_RTS_Uniform::eUniformType in_eType, const char *in_szName, unsigned int in_uiSize, void *in_pData)=0
virtual bool  ClearUniforms ()=0
virtual unsigned long  GetNbUniforms ()=0
virtual XSI_RTS_Uniform **  GetUniformList ()=0
virtual bool  DrawGeometry (eGraphicsAPI in_eAPI, XSI_RTS_Primitive *in_pGeometry, XSI_RTS_Attribute *in_pAttributes, void *in_pAttribData, XSI_RTS_Attribute_Size *in_pAttributesSize)=0
virtual bool  DrawGeometry (eGraphicsAPI in_eAPI, XSI_RTS_Primitive *in_pGeometry, const char *in_szMapping, void *in_pAttribData, XSI_RTS_Attribute_Size *in_pAttributesSize)=0
virtual XSI_RTS_Attribute GetAttributeDescriptorFromMapping (const char *in_szMapping)=0
virtual void  RaiseError (const char *in_szError, eErrorType in_eErrorType)=0
virtual void  RaiseError (const char *in_szError, eErrorType in_eErrorType, int in_Parameter, ULONG_PTR in_lData)=0
virtual void  PushExecutionState ()=0
virtual void  PopExecutionState ()=0
virtual void *  GetGraphicsAPI (eGraphicsAPI in_eAPI)=0
virtual eRenderMode  GetRenderMode ()=0


Detailed Description

The IRTSExecutionState object offers several methods to access various objects during a call to real-time shaders.

You can use this object to access the following scene data (the pointer will be cached and returned to you):

You can also use this object to:
Note:
You cannot instantiate a IRTSExecutionState object directly. You can access an instance via one of the Realtime Shader Callbacks functions.
See also:
tagXSI_RTS_SystemParams, CRTSStateList, XSI_RTS_Uniform, eGraphicsAPI, tagXSI_RTS_Primitive, _XSI_RTS_Attribute, Realtime Shader Callbacks, Execution Flow
Since:
7.0


Member Function Documentation

virtual XSI_RTS_SystemParams* GetSystemParams (  )  [pure virtual]

Returns a pointer to the legacy system parameters.

Returns:
A pointer to the tagXSI_RTS_SystemParams structure

virtual CRTSStateList* GetStateList (  )  [pure virtual]

Returns the list of executions states

Returns:
A pointer to the CRTSStateList structure
See also:
CRTSState

virtual void* GetShader (  )  [pure virtual]

Returns a pointer to the SDK shader object.

Returns:
A pointer to the Shader object
See also:
IRTSExecutionState::GetShaderParameters

virtual void* GetShaderInstanceData (  )  [pure virtual]

Returns a pointer to the user data attached to this shader instance.

Returns:
A pointer to the shader instance data
See also:
IRTSExecutionState::SetShaderInstanceData

virtual void SetShaderInstanceData ( void *  in_pData  )  [pure virtual]

Attaches user data to this instance of the shader.

Parameters:
in_pData  A pointer to the shader instance data
See also:
IRTSExecutionState::GetShaderInstanceData

virtual void* GetShaderParameters (  )  [pure virtual]

Returns a pointer to the shader parameters (ie. the PPG values)

Returns:
A pointer to the Parameter objects
See also:
IRTSExecutionState::GetShader

virtual long GetShaderUniqueID (  )  [pure virtual]

Returns a unique identifier for this instance of the shader

Returns:
The shader ID

virtual eChannel GetChannel ( int  in_iBuffer  )  [pure virtual]

Returns the RenderChannel information associated to the specified Framebuffer object.

Parameters:
in_iBuffer  Index of the Framebuffer object. If not specified, the current buffer will be used.
Returns:
A value corresponding to one of the enum values

virtual void* GetMaterial (  )  [pure virtual]

Returns a pointer to the SDK material object.

Returns:
A pointer to the Material object

virtual void* GetPrimitive (  )  [pure virtual]

Returns a pointer to the SDK primitive object.

Returns:
A pointer to the X3DObject object

virtual void* GetCamera (  )  [pure virtual]

Returns a pointer to the current SDK camera object

Returns:
A pointer to the Camera object

virtual bool DefineUniform ( XSI_RTS_Uniform::eUniformType  in_eType,
const char *  in_szName,
unsigned int  in_uiSize,
void *  in_pData  
) [pure virtual]

Defines a single uniform parameter to be used in the Realtime Shader chain.

Parameters:
in_eType  Type of the uniform parameter
in_szName  Name of the uniform parameter
in_uiSize  Size of the uniform parameter
in_pData  Pointer to the data for the uniform parameter
Returns:
Success/failure
See also:
XSI_RTS_Uniform, IRTSExecutionState::ClearUniforms, IRTSExecutionState::GetNbUniforms, IRTSExecutionState::GetUniformList

virtual bool ClearUniforms (  )  [pure virtual]

Removes all uniform parameters defined for this Realtime Shader chain.

Returns:
Success/failure
See also:
XSI_RTS_Uniform, IRTSExecutionState::DefineUniform, IRTSExecutionState::GetNbUniforms, IRTSExecutionState::GetUniformList

virtual unsigned long GetNbUniforms (  )  [pure virtual]

Returns the number of uniform parameters defined for this Realtime Shader chain.

Returns:
Size of uniform parameter list
See also:
XSI_RTS_Uniform, IRTSExecutionState::DefineUniform, IRTSExecutionState::ClearUniforms, IRTSExecutionState::GetUniformList

virtual XSI_RTS_Uniform** GetUniformList (  )  [pure virtual]

Returns the array of uniform parameters defined for this Realtime Shader chain.

Returns:
A pointer to the list of uniform parameters
See also:
XSI_RTS_Uniform, IRTSExecutionState::DefineUniform, IRTSExecutionState::ClearUniforms, IRTSExecutionState::GetUniformList

virtual bool DrawGeometry ( eGraphicsAPI  in_eAPI,
XSI_RTS_Primitive in_pGeometry,
XSI_RTS_Attribute in_pAttributes,
void *  in_pAttribData,
XSI_RTS_Attribute_Size in_pAttributesSize  
) [pure virtual]

Draws the geometry using a list of attributes. You may explicitly suggest a graphics API to use for rendering (OpenGL20, OpenGL30, DirectX10); however, if the current viewport mode does not match your request, no rendering will occur.

Tip:
To avoid this and to be certain that your rendering call will succeed, you may use the enum value Any. This tells Softimage to use the viewport's current driver to render the geometry.
Parameters:
in_eAPI  The graphics API to use for rendering
in_pGeometry  Pointer to the geometry to draw
in_pAttributes  Pointer to the attributes to use
in_pAttribData  Pointer to the attribute data
in_pAttributesSize  Pointer to the size of the attributes
Returns:
Success/failure
See also:
eGraphicsAPI, tagXSI_RTS_Primitive, _XSI_RTS_Attribute, eXSI_Attribute_Size, Geometry Data

virtual bool DrawGeometry ( eGraphicsAPI  in_eAPI,
XSI_RTS_Primitive in_pGeometry,
const char *  in_szMapping,
void *  in_pAttribData,
XSI_RTS_Attribute_Size in_pAttributesSize  
) [pure virtual]

Draws the geometry using a custom mapping of attributes to hardware registers.

Tip:
To avoid this and to be certain that your rendering call will succeed, you may use the enum value Any. This tells Softimage to use the viewport's current driver to render the geometry.
Parameters:
in_eAPI  The graphics API to use for rendering
in_pGeometry  Pointer to the geometry to draw
in_szMapping  Custom mapping to use
in_pAttribData  Pointer to the attribute data
in_pAttributesSize  Pointer to the size of the attributes
Returns:
Success/failure
See also:
eGraphicsAPI, tagXSI_RTS_Primitive, eXSI_Attribute_Size, Geometry Data

virtual XSI_RTS_Attribute* GetAttributeDescriptorFromMapping ( const char *  in_szMapping  )  [pure virtual]

Returns a list of attributes specified in the mapping.

Parameters:
in_szMapping  Custom mapping to use
Returns:
A pointer to the attributes list
See also:
eGraphicsAPI, _XSI_RTS_Attribute

virtual void RaiseError ( const char *  in_szError,
eErrorType  in_eErrorType  
) [pure virtual]

Notifies Softimage to raise an error.

Parameters:
in_szError  The error message to display
in_eErrorType  The severity of the error to raise (similar to
See also:
eErrorType

virtual void RaiseError ( const char *  in_szError,
eErrorType  in_eErrorType,
int  in_Parameter,
ULONG_PTR  in_lData  
) [pure virtual]

Notifies Softimage to raise an error. Use this function to define a parameter

Parameters:
in_szError  The error message to display
in_eErrorType  The severity of the error to raise (similar to
in_Parameter  ??
in_lData  ??
See also:
eErrorType

virtual void PushExecutionState (  )  [pure virtual]

Saves all states (currently only vertex and fragment shaders)

See also:
IRTSExecutionState::PopExecutionState

virtual void PopExecutionState (  )  [pure virtual]

Restores previously pushed states (currently only vertex and fragment shaders)

See also:
IRTSExecutionState::PushExecutionState

virtual void* GetGraphicsAPI ( eGraphicsAPI  in_eAPI  )  [pure virtual]

Returns an interface to the specified graphics. API as follows:

Parameters:
in_eAPI  The graphics API to use for rendering
Returns:
for OpenGL, it returns a pointer to the main HGLRC

for DirectX_9, it returns a pointer to a IDirect3DDevice9

for DirectX_10, it returns a pointer to a ID3D10Device

See also:
eGraphicsAPI

virtual eRenderMode GetRenderMode (  )  [pure virtual]

Returns the current render mode

Returns:
the render mode
See also:
eRenderMode
Since:
7.0


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