pCon.planner Plugin SDK  Version 8.9
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | List of all members
X3g::Plugin::IRenderCallback Interface Reference

Interface for the render callback to supervise render progress. More...

Inherited by X3g::Plugin::ManagedRenderCallbackAdapter.

Public Member Functions

void SetFramebuffer (array< unsigned char >^pBuffer, int pWidth, int pHeight, PixelFormat pFormat)
 Notifies about new framebuffer. More...
 
void UpdateFrame ()
 Notifies that an entire frame has been updated. More...
 
void FinishedRendering (bool pError)
 Notifies that the rendering is finished. More...
 
void StartRenderTask (int pNumSteps, int pTask, int pTaskCount)
 Notifies about a new Render task and sets the limits for the UpdateTaskProgress() progress. More...
 
void UpdateTaskProgress (int long pStep)
 Notifies about the current progress of the rendering. More...
 
bool RequestRestart ()
 Restart was requested. More...
 

Detailed Description

Interface for the render callback to supervise render progress.

Create your own class that inherits from IRenderCallback and register it to the property called Callback of your desired Renderer.

Member Function Documentation

void X3g::Plugin::IRenderCallback::FinishedRendering ( bool  pError)

Notifies that the rendering is finished.

Parameters
pErrorIndicates that an error happened.
bool X3g::Plugin::IRenderCallback::RequestRestart ( )

Restart was requested.

This function will be polled before changing render settings.

Returns
A return value of true allows rendering restarts and the change of renderer settings.
A return value of false keeps previous settings.
The default return value should be true.
void X3g::Plugin::IRenderCallback::SetFramebuffer ( array< unsigned char >^  pBuffer,
int  pWidth,
int  pHeight,
PixelFormat  pFormat 
)

Notifies about new framebuffer.

Pixel formats RGBA32 and RGBA128F have pre-multiplied alpha.

void X3g::Plugin::IRenderCallback::StartRenderTask ( int  pNumSteps,
int  pTask,
int  pTaskCount 
)

Notifies about a new Render task and sets the limits for the UpdateTaskProgress() progress.

Parameters
pNumStepsThe amount of steps for one task to complete.
pTaskThe number of the started task.
pTaskCountThe amount of tasks in queue.
void X3g::Plugin::IRenderCallback::UpdateFrame ( )

Notifies that an entire frame has been updated.

A frame is one iteration over the entire image.

void X3g::Plugin::IRenderCallback::UpdateTaskProgress ( int long  pStep)

Notifies about the current progress of the rendering.

Parameters
pStepIndicates the progress on a scale from 0 to NumSteps representing 0 to 100% progress.
The value of NumSteps has been set in StartRenderTask() with the pNumSteps parameter.