CGraphicSequencer Class Reference
 
 
 
CGraphicSequencer Class Reference

#include <xsi_graphicsequencer.h>


Class Description

The CGraphicSequencer object offers several services to enable custom rendering passes in the OpenGL viewport.

You cannot instantiate a CGraphicSequencer object directly. Rather, you receive an instance when your XGS plug-ins are called; that is, in a Custom Display callback or a Custom OpenGL Pass.

See also:
GraphicSequencerContext, siViewMode, siXGSRenderFlag
Since:
4.0

List of all members.

Public Member Functions

  CGraphicSequencer ()
  ~CGraphicSequencer ()
CStatus  RegisterDisplayCallback (const CString &in_szName, const LONG in_lStateFlags, const siDisplayCallback in_eType, const siViewMode in_eViewMode, const CString &in_szCustomViewModeName) const
CStatus  RegisterPassCallback (const CString &in_szPassName, const LONG in_lStateFlags, const LONG in_lPassFlags, const CString &in_szRelativePassName) const
CStatus  RenderSceneUsingMode (const siViewMode in_eViewMode, INT in_lRenderFlags) const
CStatus  RenderSceneUsingMaterial (const CString &in_szShaderName, INT in_lRenderFlags) const
CStatus  RenderListUsingMode (const CRefArray &in_pObjectList, const siViewMode in_eViewMode) const
CStatus  RenderListUsingMaterial (const CRefArray &in_pObjectList, const CString &in_szShaderName) const
CStatus  GetNbStates (siXGSStateType in_eType, INT *out_pNbStates) const
CStatus  DeleteState (siXGSStateType in_eType, const CString &in_pID) const
CStatus  CreateState (siXGSStateType in_eType, const CString &in_pID, void *in_pValuePtr, void **out_pStateHandle) const
CStatus  GetStateHandle (siXGSStateType in_eType, const CString &in_pID, void **out_pStateHandle) const
CStatus  GetStateValue (siXGSStateType in_eType, void *in_lStateHandle, void *out_pStateValue) const
CStatus  SetStateValue (siXGSStateType in_eType, void *in_lStateHandle, void *in_pStateValue) const
CStatus  GetSceneDirtyFlag (bool *out_bBool) const
CStatus  GetContextFlags (LONG *out_lFlags) const
CValueArray  GetFramebufferInfo () const
CStatus  PutFramebufferData (UINT in_uiFramebufferIndex, ULONG in_ulSizeInBytes, void *in_pData) const
CValue  GetSetting (XSI::CString in_name) const
Property  GetRendererProperty (const CTime &in_rTime) const
CRef  GetCamera () const
CStatus  RegisterViewportMode (const CString &in_szName, const siGraphicDriver in_eAPI, LONG in_lFeatures) const
CStatus  RegisterViewportCallback (const CString &in_szName, const LONG in_lStateFlags, const siDisplayCallback in_eType, const siGraphicDriver in_eDriver, const siViewMode in_eViewMode, const CStringArray &in_szCustomViewModeList) const
CRef  GetGraphicDriver () const
CStatus  GetViewportSize (UINT &out_uiStartX, UINT &out_uiStartY, UINT &out_Width, UINT &out_Height) const
bool  IsPlayback ()

Constructor & Destructor Documentation

Default constructor.

Default destructor.


Member Function Documentation

CStatus RegisterDisplayCallback ( const CString in_szName,
const LONG  in_lStateFlags,
const siDisplayCallback  in_eType,
const siViewMode  in_eViewMode,
const CString in_szCustomViewModeName 
) const

Registers a new Display callback with the OGS.

Parameters:
in_szName The display callback name
in_lStateFlags The callback state flags
in_eType The type of callback (see siDisplayCallback)
in_eViewMode The view mode (see siViewMode)
in_szCustomViewModeName The name to use for the new custom view mode
Returns:
CStatus::OK if the new display callback was registered
CStatus::Fail if the registration failed
Deprecated:
9.0 (2011) This version is kept for backward compatibility, please use CGraphicSequencer::RegisterViewportCallback instead.
CStatus RegisterPassCallback ( const CString in_szPassName,
const LONG  in_lStateFlags,
const LONG  in_lPassFlags,
const CString in_szRelativePassName 
) const

Registers a new Pass callback with the XGS.

Warning:
Not Implemented. Use CGraphicSequencer::RegisterDisplayCallback with the in_eType parameter set to siPass instead.
Parameters:
in_szPassName The pass callback name
in_lStateFlags The callback state flags
in_lPassFlags The pass callback flags
in_szRelativePassName The name of the pass used for relative insertion.
Returns:
CStatus::OK if the new pass callback was registered
CStatus::Fail if the registration failed
Deprecated:
9.0 (2011) This version is kept for backward compatibility, please use CGraphicSequencer::RegisterViewportMode instead.
CStatus RenderSceneUsingMode ( const siViewMode  in_eViewMode,
INT  in_lRenderFlags 
) const

Renders the scene using the specified legacy mode.

Parameters:
in_eViewMode The legacy mode to use
in_lRenderFlags The render flags to use (one of the siXGSRenderFlag values)
Returns:
CStatus::OK if the scene was successfully rendered
CStatus::Fail if the registration failed or if the mode was not found
See also:
siXGSRenderFlag
CStatus RenderSceneUsingMaterial ( const CString in_szShaderName,
INT  in_lRenderFlags 
) const

Renders the scene using the specified Shader material.

Parameters:
in_szShaderName The name of the Shader to use for rendering
in_lRenderFlags The render flags to use (one of the siXGSRenderFlag values)
Returns:
CStatus::OK if the scene was successfully rendered
CStatus::Fail if the registration failed or if the material was invalid
See also:
siXGSRenderFlag
CStatus RenderListUsingMode ( const CRefArray in_pObjectList,
const siViewMode  in_eViewMode 
) const

Renders a list of objects using the specified legacy mode.

Parameters:
in_pObjectList The list of objects to draw (array of references to objects)
in_eViewMode The legacy mode to use
Returns:
CStatus::OK if the list was successfully rendered
CStatus::Fail if the registration failed or if the mode was not found
CStatus RenderListUsingMaterial ( const CRefArray in_pObjectList,
const CString in_szShaderName 
) const

Renders a list of objects using a specific Shader material.

Parameters:
in_pObjectList The list of objects to draw (array of references to objects)
in_szShaderName The name of the Shader to use for rendering
Returns:
CStatus::OK if the list was successfully rendered
CStatus::Fail if the registration failed or if the mode was not found
CStatus GetNbStates ( siXGSStateType  in_eType,
INT *  out_pNbStates 
) const

Returns the number of states matching the specified type.

Parameters:
in_eType The state type to count (one of the siXGSStateType values)
Return values:
out_pNbStates Pointer to an integer holding the number of states
Returns:
CStatus::OK on success
CStatus::Fail if the arguments are invalid
CStatus DeleteState ( siXGSStateType  in_eType,
const CString in_pID 
) const

Deletes a state by its identification (CString).

Parameters:
in_eType The state type to delete (one of the siXGSStateType values)
in_pID String identifying the state
Returns:
CStatus::OK on success
CStatus::Fail if the state was not found
CStatus CreateState ( siXGSStateType  in_eType,
const CString in_pID,
void *  in_pValuePtr,
void **  out_pStateHandle 
) const

Creates a new state.

Parameters:
in_eType The state type to create (one of the siXGSStateType values)
in_pID String identifying the new state
in_pValuePtr The state value
Return values:
out_pStateHandle The state handle
Returns:
CStatus::OK on success
CStatus::Fail if the arguments are invalid
CStatus GetStateHandle ( siXGSStateType  in_eType,
const CString in_pID,
void **  out_pStateHandle 
) const

Returns the state handle by its identification (CString).

Parameters:
in_eType The state type to get (one of the siXGSStateType values)
in_pID String identifying the state
Return values:
out_pStateHandle The state handle
Returns:
CStatus::OK on success
CStatus::Fail if the arguments are invalid
CStatus GetStateValue ( siXGSStateType  in_eType,
void *  in_lStateHandle,
void *  out_pStateValue 
) const

Returns the specified state's value.

Parameters:
in_eType The state type to get (one of the siXGSStateType values)
in_lStateHandle The handle to the state
Return values:
out_pStateValue Pointer to the state value
Returns:
CStatus::OK on success
CStatus::Fail if the arguments are invalid
CStatus SetStateValue ( siXGSStateType  in_eType,
void *  in_lStateHandle,
void *  in_pStateValue 
) const

Sets the specified state's value.

Parameters:
in_eType The state type to set (one of the siXGSStateType values)
in_lStateHandle The handle to the state
in_pStateValue Pointer to the state value
Returns:
CStatus::OK on success
CStatus::Fail if the arguments are invalid
CStatus GetSceneDirtyFlag ( bool *  out_bBool ) const

Indicates whether the scene has changed since the last frame.

Return values:
out_bBool True if the scene has changed, false otherwise
Returns:
CStatus::OK on success
CStatus::Fail if the arguments are invalid
CStatus GetContextFlags ( LONG *  out_lFlags ) const

Returns a flag that indicates the context in which the rendering is occuring.

Return values:
out_lFlags The context flags. These are bitwise flags of siXGSContextFlag values
Returns:
CStatus::OK on success
CStatus::Fail if the arguments are invalid
See also:
siXGSContextFlag
Since:
4.2
CValueArray GetFramebufferInfo ( ) const

Returns a list of values describing active framebuffers. The first element in the array is the number of framebuffers. The second element is the number of values provided for each framebuffer in the array. So the size of the array is 2 + (number of values provided * number of active framebuffers).

Note:
CValueArray is empty if called while not in hardware rendering mode.
Returns:
Each framebuffer is represented in the array by the following values ordered as indicated:
See also:
siXGSContextFlag
Since:
9.0 (2011)
CStatus PutFramebufferData ( UINT  in_uiFramebufferIndex,
ULONG  in_ulSizeInBytes,
void *  in_pData 
) const

Writes an array of pixels to a framebuffer

Parameters:
in_uiFramebufferIndex The index of the framebuffer
in_ulSizeInBytes The size of the data pointed to by in_pData, in bytes
in_pData The pixel data
Returns:
CStatus::OK on success
CStatus::Fail if the arguments are invalid
CStatus::Unexpected Not in Hardware Rendering mode
See also:
siXGSContextFlag
Since:
9.0 (2011)
CValue GetSetting ( XSI::CString  in_name ) const

Returns the value of the specified XGS setting (Hardware Rendering mode only). Possible values include:

  • tile_width Integer representing the width of the tile being rendered.
  • tile_height Integer representing the height of the tile being rendered.
  • tile_index Integer representing the zero-based index of the tile being rendered.
  • tile_origin_x Integer representing the origin of the x-coordinate for the current tile.
  • tile_origin_y Integer representing the origin of the y-coordinate for the current tile.
  • tile_count Integer representing the total number of tiles in the current frame.
  • frustum_clip_plane_left Double representing the left clipping plane of the view frustum.
  • frustum_clip_plane_right Double representing the right clipping plane of the view frustum.
  • frustum_clip_plane_bottom Double representing the bottom clipping plane of the view frustum.
  • frustum_clip_plane_top Double representing the top clipping plane of the view frustum.
  • frustum_clip_plane_near Double representing the near clipping plane of the view frustum.
  • frustum_clip_plane_far Double representing the far clipping plane of the view frustum.
  • projection_type Integer value representing the projection type. 0 = Perspective and 1 = Orthographic.
  • renderer_name XSI::CString contaning the name of the current renderer.
    Parameters:
    in_name The name of the setting.
    Returns:
    The value of the setting
    Since:
    9.0 (2011)
Property GetRendererProperty ( const CTime in_rTime ) const

Returns the renderer's option property evaluated at a specific time. Which particular property instance this is is dependent upon the attribute value passed to the CGraphicSequencerContext.

Parameters:
in_rTime The time to evaluate the property at.
Returns:
The evaluated renderer option property.
Since:
9.0 (2011)
CRef GetCamera ( ) const

Returns the current camera object which is used for the current rendering

Returns:
CRef A reference to a Camera object
Since:
7.0
CStatus RegisterViewportMode ( const CString in_szName,
const siGraphicDriver  in_eAPI,
LONG  in_lFeatures 
) const

Registers a new Viewport mode

Parameters:
in_szName The name of the viewport
in_eAPI The graphics driver to use for this viewport. Use siNullGraphicDriver if your viewport will handle its own rendering.
in_lFeatures These are bitwise flags of siViewportFeature values
Returns:
CStatus::OK if the new viewport was registered
CStatus::Fail if the registration failed
Since:
9.0 (2011)
CStatus RegisterViewportCallback ( const CString in_szName,
const LONG  in_lStateFlags,
const siDisplayCallback  in_eType,
const siGraphicDriver  in_eDriver,
const siViewMode  in_eViewMode,
const CStringArray in_szCustomViewModeList 
) const

Registers a new Viewport callback

Parameters:
in_szName The name of the viewport
in_lStateFlags The callback state flags
in_eType The type of callback (see siDisplayCallback)
in_eDriver The graphics driver to use for this viewport. Use siNullGraphicDriver if your viewport will handle its own rendering.
in_eViewMode The view mode (see siViewMode)
in_szCustomViewModeList The list of names to use for the new custom view mode
Returns:
CStatus::OK if the new viewport was registered
CStatus::Fail if the registration failed
Since:
9.0 (2011)
CRef GetGraphicDriver ( ) const

Returns the current graphic driver

Returns:
A reference to the current graphic driver
Since:
9.0 (2011)
CStatus GetViewportSize ( UINT &  out_uiStartX,
UINT &  out_uiStartY,
UINT &  out_Width,
UINT &  out_Height 
) const

Returns the size of the current viewport

Return values:
out_uiStartX leftmost position in X (horizontal start position)
out_uiStartY rightmost position in Y (vertical start position)
out_Width width of viewport
out_Height height of viewport
Returns:
Success/failure
Since:
9.0 (2011)
bool IsPlayback ( )

Returns true if the scene is currently in playback mode

Returns:
true if the scene is in playback mode
false otherwise
Since:
9.0 (2011)

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