MRenderTargetDescription Class Reference
#include <MRenderTargetManager.h>
Class which provides a description of a hardware render target The name is the unique identifier for a render target.
- blast2Cmd/blast2Cmd.cpp, dx11Shader/dx11Shader.cpp, hwApiTextureTest/hwRendererHelper.cpp, hwApiTextureTest/hwRendererHelperDX.cpp, hwApiTextureTest/hwRendererHelperGL.cpp, viewDX11DeviceAccess/viewDX11DeviceAccess.cpp, viewRenderOverride/viewRenderOverride.cpp, viewRenderOverride/viewRenderOverride.h, viewRenderOverrideMRT/viewRenderOverrideMRT.cpp, viewRenderOverrideMRT/viewRenderOverrideMRT.h, viewRenderOverridePostColor/viewRenderOverridePostColor.cpp, and viewRenderOverridePostColor/viewRenderOverridePostColor.h.
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.
- Cube maps, and generalized arrays of targets can be specified by providing an array (slice) count which is greater than zero. A "slice" is logically equivalent to a 2D render target.
- If multiple slices are specified, then an additional flag is required to distinguish between a general array of 2D targets and a one which forms a cube map.
- Parameters
-
[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. |
Query the name identifier for the target description.
- Returns
- Identifier name
unsigned int width |
( |
| ) |
const |
Query the width of a 2D render target slice.
- Returns
- Width value
unsigned int height |
( |
| ) |
const |
Query the height of a 2D render target slice.
- Returns
- Height value
unsigned int multiSampleCount |
( |
| ) |
const |
Query the multi-sample count defined by the description.
- Returns
- Sample value
Query the raster format defined by the description.
- Returns
- The raster format.
unsigned int arraySliceCount |
( |
| ) |
const |
Query the number of array slices defined by the description.
- Returns
- The slice count
Query whether this is a cube map target.
- Returns
- True if the target describes a cubemap.
bool allowsUnorderedAccess |
( |
| ) |
const |
void setName |
( |
const MString & |
name | ) |
|
Set name of the target.
- Parameters
-
void setWidth |
( |
unsigned int |
val | ) |
|
Set width of the target.
- Parameters
-
void setHeight |
( |
unsigned int |
val | ) |
|
Set height of the target.
- Parameters
-
void setMultiSampleCount |
( |
unsigned int |
val | ) |
|
Set multisample count of the target.
- Parameters
-
[in] | val | Sample count to set. |
Set the raster format of the target.
- Parameters
-
void setArraySliceCount |
( |
unsigned int |
val | ) |
|
Set array slice count of the target.
- Parameters
-
[in] | val | Slice count to set. |
void setIsCubeMap |
( |
bool |
val | ) |
|
Set cube map flag for the target.
- Parameters
-
[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.
- Parameters
-
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.
- Parameters
-
[in] | desc | Description to compare with |
- Returns
- false if incompatible.
The documentation for this class was generated from the following files:
- MRenderTargetManager.h
- MRenderTargetManager.cpp