MUserRenderOperation Class Reference

#include <MViewport2Renderer.h>

Class Description

+ Inheritance diagram for MUserRenderOperation:

Public Member Functions

 MUserRenderOperation (const MString &name)
 Constructor for named user render operation. More...
 
virtual ~MUserRenderOperation ()
 Default destructor for a user render operation.
 
virtual const MCameraOverridecameraOverride ()
 Query for a camera override. More...
 
virtual MStatus execute (const MDrawContext &drawContext)=0
 Each user operation is responsible for "executing" itself. More...
 
virtual bool hasUIDrawables () const
 addUIdrawables() will be called only if this method is overridden to return true. More...
 
virtual void addUIDrawables (MUIDrawManager &drawManager, const MFrameContext &frameContext)
 Provides access to the MUIDrawManager, which can be used to queue up operations to draw simple UI shapes like lines, circles, text, etc. More...
 
virtual bool requiresLightData () const
 Indicates whether light data from the renderer is required for this user operation. More...
 
- Public Member Functions inherited from MRenderOperation
virtual bool enableSRGBWrite ()
 Return whether to enable GPU based gamma correction during pixel writes. More...
 
virtual const MFloatPointviewportRectangleOverride ()
 Query for a viewport rectangle override. More...
 
virtual const MStringname () const
 Query the name of a render operator. More...
 
virtual bool getInputTargetDescription (const MString &name, MRenderTargetDescription &description)
 Return the description to use when creating the target for the named input. More...
 
virtual int writableTargets (unsigned int &count)
 Return the index of the first writable target in the inputTargets list. More...
 
virtual MRenderTarget *const * targetOverrideList (unsigned int &listSize)
 Return a list of pointers to render target which will be used as the target overrides for the operation. More...
 
const MStringArrayinputTargets ()
 An array of input target names that semantically declares the type of targets the operation requires as input. More...
 
const MStringArrayoutputTargets ()
 An array of output target names that semantically declares the type of targets the operation can produce. More...
 
void renameOutputTarget (const MString &name, const MString &newName)
 Renames an output target of an operation. More...
 
MRenderOperationType operationType () const
 Query the type (MRenderOperationType) of a render operator. More...
 

Additional Inherited Members

- Public Types inherited from MRenderOperation
enum  MRenderOperationType {
  kClear, kSceneRender, kQuadRender, kUserDefined,
  kHUDRender, kPresentTarget
}
 Supported render operation types. More...
 
- Protected Member Functions inherited from MRenderOperation
 MRenderOperation (const MString &name)
 Protected constructor. More...
 
MRenderTargetgetInputTarget (const MString &name)
 Gets the target associated with this input. More...
 
- Protected Attributes inherited from MRenderOperation
MRenderOperationType mOperationType
 Operation type.
 
MString mName
 Identifier for a sub render.
 

Constructor & Destructor Documentation

MUserRenderOperation ( const MString name)

Constructor for named user render operation.

Parameters
[in]nameName of render operation

Member Function Documentation

const MCameraOverride * cameraOverride ( )
virtual

Query for a camera override.

The default implementation returns that there is no override.

Returns
Reference to the camera override. NULL if there is no override.
+ Examples:
MStatus execute ( const MDrawContext drawContext)
pure virtual

Each user operation is responsible for "executing" itself.

Parameters
[in]drawContextHardware draw context information

Refer the the documentation for MRenderOverride::startOperationIterator() which describes when this method will be invoked.

Returns
Status code
Status Codes:
+ Examples:
bool hasUIDrawables ( ) const
virtual

addUIdrawables() will be called only if this method is overridden to return true.

The default implementation returns false.

If addUIDrawables() is not needed, this method should return false in order to avoid extra overhead required for adding UI drawables to the override.

Returns
Whether addUIDrawables() will be called or not.
+ Examples:
void addUIDrawables ( MUIDrawManager drawManager,
const MFrameContext frameContext 
)
virtual

Provides access to the MUIDrawManager, which can be used to queue up operations to draw simple UI shapes like lines, circles, text, etc.

This method will only be called when hasUIDrawables() is overridden to return true.

Parameters
[in]drawManagerThe UI draw manager, it can be used to draw some simple geometry including text.
[in]frameContextFrame level context information
+ Examples:
bool requiresLightData ( ) const
virtual

Indicates whether light data from the renderer is required for this user operation.

This is generally only required to return true when the renderer has not previously performed any scene render. In that case light data will not be available as it is created on-demand during rendering.

By default this method returns false.

+ Examples:

The documentation for this class was generated from the following files:
  • MViewport2Renderer.h
  • MViewport2Renderer.cpp