MPresentTarget Class Reference

This reference page is linked to from the following overview topics: Rendering Overrides, 3.6 Render Loop Overrides.



Detailed Description

Class which defines the operation of presenting a target for final output.

#include <MViewport2Renderer.h>

Inheritance diagram for MPresentTarget:

List of all members.

Public Types

enum  MTargetBackBuffer { kCenterBuffer, kLeftBuffer, kRightBuffer }
 

Supported output target back-buffer options.

More...

Public Member Functions

 MPresentTarget (const MString &name)
 Constructor for a named target presentation operation.
virtual ~MPresentTarget ()
 Default destructor for target presentation operation.
bool presentDepth () const
 Query whether the present operation will display depth values.
void setPresentDepth (bool val)
 Set whether the operation will present depth values.
MTargetBackBuffer targetBackBuffer () const
 Query the desired back-buffer to use on the output target.
void setTargetBackBuffer (MTargetBackBuffer backBuffer)
 Set the desired back-buffer to use on the output target.

Protected Attributes

MTargetBackBuffer mTargetBackBuffer
 Back-buffer of output target to render to.

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

MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget
MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget MPresentTarget