C++ API Reference: MDataServerOperation Class Reference

Introduced in 2024.0 More...

#include <MViewport2Renderer.h>

+ Inheritance diagram for MDataServerOperation:

Public Member Functions

 MDataServerOperation (const MString &name)
 Constructor for named user render operation. More...
 
 ~MDataServerOperation () override
 Default destructor for a user render operation.
 
virtual MStatus execute (const MDrawContext &drawContext, const MViewportScene &scene)=0
 The operation recieves acess to a renderable version of objects in the scene via an MViewportScene. 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,
  kDataServer, 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.
 

Detailed Description

Introduced in 2024.0

2024.0:
Introduced in this version.

Class which defines a dataserver operation. This accesses a set of render items describing the scene, for the purposes of custom rendering. Note that this class is experimental and subject to future changes.

Constructor & Destructor Documentation

MDataServerOperation ( const MString name)

Constructor for named user render operation.

Parameters
[in]nameName of render operation

Member Function Documentation

MStatus execute ( const MDrawContext drawContext,
const MViewportScene &  scene 
)
pure virtual

The operation recieves acess to a renderable version of objects in the scene via an MViewportScene.

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:
  • MS::kSuccess The operation executed successfully.
  • MS::kFailure The operation failed.

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