This reference page is linked to from the following overview topics: Extension for Autodesk Maya 2013, Rendering Overrides, 2.5 Render Targets and Render Target Manager.
Class which provides a description of a hardware render target The name is the unique identifier for a render target.
#include <MRenderTargetManager.h>
Public Member Functions | |
| MRenderTargetDescription () | |
| Default constructor, initalizes description with zero height and width and other simple default values. | |
| MRenderTargetDescription (const MString &name, unsigned int width, unsigned int height, unsigned int multiSampleCount, MHWRender::MRasterFormat rasterFormat, unsigned int arraySliceCount, bool isCubeMap) | |
| Constructor for a render target description. | |
| virtual | ~MRenderTargetDescription () |
| Default destructor. | |
| const MString & | name () const |
| Query the name identifier for the target description. | |
| unsigned int | width () const |
| Query the width of a 2D render target slice. | |
| unsigned int | height () const |
| Query the height of a 2D render target slice. | |
| unsigned int | multiSampleCount () const |
| Query the multi-sample count defined by the description. | |
| MHWRender::MRasterFormat | rasterFormat () const |
| Query the raster format defined by the description. | |
| unsigned int | arraySliceCount () const |
| Query the number of array slices defined by the description. | |
| bool | isCubeMap () const |
| Query whether this is a cube map target. | |
| bool | allowsUnorderedAccess () const |
| Query whether unordered access is supported. | |
| void | setName (const MString &name) |
| Set name of the target. | |
| void | setWidth (unsigned int val) |
| Set width of the target. | |
| void | setHeight (unsigned int val) |
| Set height of the target. | |
| void | setMultiSampleCount (unsigned int val) |
| Set multisample count of the target. | |
| void | setRasterFormat (MHWRender::MRasterFormat val) |
| Set the raster format of the target. | |
| void | setArraySliceCount (unsigned int val) |
| Set array slice count of the target. | |
| void | setIsCubeMap (bool val) |
| Set cube map flag for the target. | |
| void | setAllowsUnorderedAccess (bool val) |
| Set the flag for unordered data access for the target. | |
| bool | compatibleWithDescription (const MRenderTargetDescription &desc) |
| Determine if another target with a given description is 'compatible' with a target using this description. | |
| MRenderTargetDescription | ( | const MString & | name, |
| unsigned int | width, | ||
| unsigned int | height, | ||
| unsigned int | multiSampleCount, | ||
| MHWRender::MRasterFormat | rasterFormat, | ||
| unsigned int | arraySliceCount, | ||
| bool | isCubeMap | ||
| ) |
Constructor for a render target description.
The basic description of a 2 dimensional (2D) target is the width, height, the sample count, and the raster format.
| [in] | name | Name of the target description |
| [in] | width | Width in pixels |
| [in] | height | Height in pixels |
| [in] | multiSampleCount | Number of samples for a multisampled anti-aliased (MSAA) target. A value of 1 indicates no multisampling. |
| [in] | rasterFormat | Raster / pixel format of the target. |
| [in] | arraySliceCount | The number of array slices. A value of 1 means a single 2D target. |
| [in] | isCubeMap | A true value indicates that the target is a cube map. In this case the arraySliceCount is set to be 6 in the constructor. The argument is ignored if the number of array slices is not equal to 6. |
| const MString & name | ( | ) | const |
Query the name identifier for the target description.
| unsigned int width | ( | ) | const |
| unsigned int height | ( | ) | const |
| unsigned int multiSampleCount | ( | ) | const |
Query the multi-sample count defined by the description.
| MRasterFormat rasterFormat | ( | ) | const |
Query the raster format defined by the description.
| unsigned int arraySliceCount | ( | ) | const |
Query the number of array slices defined by the description.
| bool isCubeMap | ( | ) | const |
Query whether this is a cube map target.
| bool allowsUnorderedAccess | ( | ) | const |
Query whether unordered access is supported.
Refer to the MRenderTargetDescription::setAllowsUnorderedAccess() method for more details about the meaning of "unordered access".
| void setName | ( | const MString & | name | ) |
| void setWidth | ( | unsigned int | val | ) |
| void setHeight | ( | unsigned int | val | ) |
| void setMultiSampleCount | ( | unsigned int | val | ) |
Set multisample count of the target.
| [in] | val | Sample count to set. |
| void setRasterFormat | ( | MHWRender::MRasterFormat | val | ) |
| void setArraySliceCount | ( | unsigned int | val | ) |
Set array slice count of the target.
| [in] | val | Slice count to set. |
| void setIsCubeMap | ( | bool | val | ) |
Set cube map flag for the target.
| [in] | val | Cube map flag to set. |
| void setAllowsUnorderedAccess | ( | bool | val | ) |
Set the flag for unordered data access for the target.
This indicates that read and write access to the target's data from multiple threads is supported. For example, this allows pixel and compute shaders running in parallel to have the same unordered access targets bound.
| [in] | val | Value to set |
| bool compatibleWithDescription | ( | const MRenderTargetDescription & | desc | ) |
Determine if another target with a given description is 'compatible' with a target using this description.
Compatibility implies that the targets can be used together when specifying multiple render targets.
The general minimum requirements are that the dimensions and multisampling properties are identical. Neither target can be a depth target.
| [in] | desc | Description to compare with |