MPresentTarget Class Reference

#include <MViewport2Renderer.h>

Class Description

+ Inheritance diagram for MPresentTarget:

Public Types

enum  MTargetBackBuffer { kCenterBuffer, kLeftBuffer, kRightBuffer }
 Supported output target back-buffer options. More...
 
- Public Types inherited from MRenderOperation
enum  MRenderOperationType {
  kClear, kSceneRender, kQuadRender, kUserDefined,
  kHUDRender, kPresentTarget
}
 Supported render operation types. More...
 

Public Member Functions

 MPresentTarget (const MString &name)
 Constructor for a named target presentation operation. More...
 
virtual ~MPresentTarget ()
 Default destructor for target presentation operation.
 
bool presentDepth () const
 Query whether the present operation will display depth values. More...
 
void setPresentDepth (bool val)
 Set whether the operation will present depth values. More...
 
bool enableSRGBWrite ()
 The present operation never enables SRGB. More...
 
MTargetBackBuffer targetBackBuffer () const
 Query the desired back-buffer to use on the output target. More...
 
void setTargetBackBuffer (MTargetBackBuffer backBuffer)
 Set the desired back-buffer to use on the output target. More...
 
- Public Member Functions inherited from MRenderOperation
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...
 

Protected Attributes

MTargetBackBuffer mTargetBackBuffer
 Back-buffer of output target to render to.
 
bool mPresentDepth
 Present depth.
 
- Protected Attributes inherited from MRenderOperation
MRenderOperationType mOperationType
 Operation type.
 
MString mName
 Identifier for a sub render.
 

Additional Inherited Members

- 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...
 

Member Enumeration Documentation

Supported output target back-buffer options.

If the final output target is an on-screen OpenGL context which supports active stereo rendering then it is possible to send the output to either the left or right back-buffer.

If the final output target is an offscreen target or if the on-screen OpenGL context being used does not support active stereo, then only the 'center' option can be used. 'Center' is the default back-buffer associated with an OpenGL context. If 'left' or 'right' options are specified they will be ignored in these cases.

This option is currently ignored if the active rendering API is not OpenGL.

Enumerator
kCenterBuffer 

Default or 'center' buffer.

kLeftBuffer 

Left back-buffer.

kRightBuffer 

Right back-buffer.

Constructor & Destructor Documentation

MPresentTarget ( const MString name)

Constructor for a named target presentation operation.

By default the operation will not present depth values, and the output target back-buffer is set to kCenterBuffer.

Parameters
[in]nameName of operation

Member Function Documentation

bool presentDepth ( ) const

Query whether the present operation will display depth values.

Returns
true if depth should be presented.
void setPresentDepth ( bool  val)

Set whether the operation will present depth values.

Parameters
[in]valValue to set depth presentation data member.
bool enableSRGBWrite ( )
virtual

The present operation never enables SRGB.

Returns
false

Reimplemented from MRenderOperation.

MPresentTarget::MTargetBackBuffer targetBackBuffer ( ) const

Query the desired back-buffer to use on the output target.

Returns
Left, center or right back-buffer
void setTargetBackBuffer ( MPresentTarget::MTargetBackBuffer  backBuffer)

Set the desired back-buffer to use on the output target.

Parameters
[in]backBufferBack-buffer to set

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