Detailed Description
This object is provided as the context object in the execution
callback of a hardware shader.
- See also:
-
PluginRegistrar::RegisterShader
- Since:
- 9.0 (2011)
#include <xsi_hardwareshadercontext.h>
List of
all members.
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
in_ref |
constant reference object. |
Copy constructor.
- Parameters:
-
in_obj |
constant class object. |
Member Function Documentation
bool IsA |
( |
siClassID |
in_ClassID |
) |
const [virtual] |
Returns true if a given class type is compatible with this API
class.
- Parameters:
-
- Returns:
- true if the class is compatible, false otherwise.
Reimplemented from Context.
Returns the type of the API class.
- Returns:
- The class type.
Reimplemented from Context.
Creates an object from another object.
- Parameters:
-
in_obj |
constant class object. |
- Returns:
- The new
HardwareShaderContext object.
Creates an object from a reference object. The newly created
object is set to empty if the input reference object is not
compatible.
- Parameters:
-
in_ref |
constant class object. |
- Returns:
- The new
HardwareShaderContext object.
Reimplemented from Context.
Returns the
Shader object which is being drawn in the viewport.
- Returns:
- The
Shader object being drawn in the viewport.
Shader GetShaderForAnimation |
( |
|
) |
|
Returns the
Shader object which is being drawn in the viewport. Use this
method if you plan to access parameters with a time different than
the current time (causing an evaluation)
- Returns:
- The
Shader object being drawn in the viewport.
Returns the Camera
object which is associated with the viewport currently being
refreshed.
- Returns:
- The Camera
object.
- Since:
- 9.0 (2011)
Returns the parent
Material object.
- Returns:
- The
Material parent object of the hardware shader.
Returns the
X3DObject associated with the shader.
- Returns:
- The
X3DObject object. Returns an invalid object if called outside
the Execute phase.
ULONG GetShaderUniqueID |
( |
|
) |
|
Returns a unique identifier for the hardware shader.
- Returns:
- Unique identifier.
Returns the time at which the viewport redraw is occurring. The
shader should use this to set the evaluation time for the scene
data being drawn.
- Returns:
- The time at which the current frame is being drawn.
void* GetTriangleIndices |
( |
|
) |
|
Get the index list making up the triangles for this object. The
type is defined by GetIndexWidth.
- Returns:
- A list of triangle indices as defined by the
XSI_RTS_Primitive::m_pIndices.
The size of each index (4=UINT, 2=USHORT, 1=UBYTE) returned by
GetTriangleIndices.
- Returns:
- Array of triangle indices.
The total number of indices returned by GetTriangleIndices.
Divide the returned value by 3 if you want to get the number of
triangles.
- Returns:
- Array of indices.
Get the number of unique vertices making up the geometry
- Returns:
- Array of vertex indices.
Return the hardware attribute array associated to a given
context.
bool IsGeometryDirty |
( |
|
) |
const |
Returns true if the geometry has changed since the last time the
frame was drawn.
- Returns:
- Returns true if the geometry has changed, false otherwise.
Returns the transformation of the object, or the current
instance of the object being drawn.
- Returns:
- The Transformation object.
Must be called by the hardware shader for drawing the primitive
as triangle elements.
- Parameters:
-
in_eDriver |
The graphic driver to use for drawing. |
Must be called by the hardware shader for drawing the primitive
as 4 points polygon.
- Parameters:
-
in_eDriver |
The graphic driver to use for drawing. |
Creates a new hardware surface object.
- Parameters:
-
in_options |
Options for creating the hardware surface. |
- Returns:
- New hardware surface
void SetRenderTarget |
( |
UINT |
in_nDrawBufferIndex, |
|
|
HardwareSurface
& |
in_surface |
|
) |
|
|
Sets the current render target for the specified draw buffer
index.
- Parameters:
-
in_nDrawBufferIndex |
Draw buffer index. |
in_surface |
The hardware surface to use as target. |
Sets the current render depth/stencil target
CRef GetGraphicDriver |
( |
|
) |
const |
Return the current graphic driver .
- Returns:
- The current graphic driver
Returns an array of
XSI::HardwareSurface representing the Screen Space Shadow Maps.
A Screen Space Shadow map can be used by a realtime shaders by
doing a screen space lookup. A single shadow map can store the
shadow intensity for up to 4 lights in individual color components.
The out_lights parameter returns a list of lights that uses each
shadow map color component. For example, if 5 lights cast shadows,
the method will return 2
HardwareSurface with 5 lights in out_lights. The red, green,
blue and alpha components in the first
HardwareSurface map to the shadow intensity of the first 4
lights. The red component of the second
HardwareSurface maps to fifth light. The shadow map is in
screen space, so a simple texture lookup is enough to retreive the
shadow intensity for 4 lights at a time.
- Parameters:
-
out_lights |
Light list ordered by shadow map component. |
- Returns:
-
CRefArray Array of
XSI::HardwareSurface objects or an Empty array if no shadow
surfaces were computed.
Returns the parameters from the render tree which values have
changed since the last shader evaluation. These parameters are
available for the next evaluation only. The shader renderer must be
set with the XSI::siHWShaderPropertyUpdateAttribute option to
enable this mechanism.
- Returns:
-
Parameter objects.
- See also:
- XSI::siHWShaderPropertyUpdateAttribute
- Since:
- 10.5 (2012)
The documentation for this class was generated from the following
file: