Execute (Graphic Sequencer)

Description

Use this callback to implement your display callback or display pass.

Display callbacks and display passes share the OpenGL state machine with Softimage. If you need to change the OpenGL state, you should restore the original state when you are finished.

Applies To

Graphic Sequencer

Syntax

    // C++
    void <xgs_plugin-item_name>_Execute(
       CRef in_context,
       LPVOID *in_pUserData
    ) {
       ...
    }

<xgs_plugin-item_name> is the name specified in the call to RegisterDisplayCallback or RegisterDisplayPass , with any spaces removed.

Parameters

Parameter | Type | Description
in_context | CRef | A reference to a GraphicSequencerContext object.
in_pUserData | LPVOID | Pointer to user data

Examples

    CStatus XSILoadPlugin( PluginRegistrar& in_reg  )
    {
       // Set installation options
       in_reg.PutVersion( 1, 0 );

       // ... (see PluginRegistrar for details)

       // Register your display callback
       CStatus in_reg.RegisterDisplayCallback( L"MyDisplayCBName" );

       // Register your display pass
       CStatus in_reg.RegisterDisplayPass( L"MyDisplayPassName" );
    }

    /* ----------------------------
       Display Callback
    */
    CStatus MyDisplayCBName_Init( CRef in_context, LPVOID *in_pData )
    {
       GraphicSequencerContext ctx = in_context;
       CGraphicSequencer in_pSequencer = ctx.GetGraphicSequencer();

    // Use the sequencer to register the callback
    in_pSequencer.RegisterDisplayCallback ( L"MyDisplayCBName", 0,
       siPostBeginFrame, siAll, NULL );

       // ...
    }

    CStatus MyDisplayCBName_Execute( CRef in_context, LPVOID *in_pData )
    {
       GraphicSequencerContext ctx = in_context;
       CGraphicSequencer in_pSequencer = ctx.GetGraphicSequencer();

       // ...
    }

    CStatus MyDisplayCBName_Term( CRef in_context, LPVOID *in_pData )
    {
       GraphicSequencerContext ctx = in_context;
       CGraphicSequencer in_pSequencer = ctx.GetGraphicSequencer();

       // ...

       // Housekeeping
       *in_pData = NULL;
    }

    /* ----------------------------
       Display Pass
    */
    CStatus MyDisplayPassName_Init( CRef in_context, LPVOID *in_pData )
    {
       GraphicSequencerContext ctx = in_context;
       CGraphicSequencer in_pSequencer = ctx.GetGraphicSequencer();

       // Use the sequencer to register the pass
       in_pSequencer.RegisterPassCallback ( L"MyDisplayPassName", 0, siAll, NULL );

       // ...
    }

    CStatus MyDisplayPassName_Execute( CRef in_context, LPVOID *in_pData )
    {
       GraphicSequencerContext ctx = in_context;
       CGraphicSequencer in_pSequencer = ctx.GetGraphicSequencer();

       // ...
    }

    CStatus MyDisplayPassName_Term( CRef in_context, LPVOID *in_pData )
    {
       GraphicSequencerContext ctx = in_context;
       CGraphicSequencer in_pSequencer = ctx.GetGraphicSequencer();

       // ...

       // Housekeeping
       *in_pData = NULL;
    }

See Also

• Init (Graphic Sequencer)

• InitInstance

• Term (Graphic Sequencer)

• TermInstance

• Display Pass Callbacks

• Display Callback Callbacks

Autodesk Softimage v7.5