C++ API Reference
|
Provides access to MRenderTarget objects for use in Viewport 2.0. More...
#include <MRenderTargetManager.h>
Public Member Functions | |
MRenderTarget * | acquireRenderTarget (const MRenderTargetDescription &targetDescription) const |
Acquire an instance of a render target. More... | |
MRenderTarget * | acquireRenderTargetFromScreen (const MString &targetName) const |
Acquire an instance of a render target with the same characteristics as the current on-screen target. More... | |
bool | formatSupportsSRGBWrite (::MHWRender::MRasterFormat format) const |
This method will perform a check to determine whether gamma correction can be performed by the GPU when writing pixels to a render target of a given format. More... | |
void | releaseRenderTarget (const MRenderTarget *target) const |
Deletes the MRenderTarget and releases the reference to the underlying target which is held by the MRenderTarget object. More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
Provides access to MRenderTarget objects for use in Viewport 2.0.
This class generates MRenderTarget objects for use with MRenderOperation objects. Any MRenderTarget objects created by this class are owned by the caller.
MRenderTarget * acquireRenderTarget | ( | const MRenderTargetDescription & | targetDescription | ) | const |
Acquire an instance of a render target.
When the object is no longer needed, MRenderTargetManager::releaseTarget() should be called to notify the target manager that the caller is done with the render target.
If a target with the same identifier already exists then no new target will be created as render targets cannot be instanced. A NULL value will be returned.
[in] | targetDescription | Description of the target |
MRenderTarget * acquireRenderTargetFromScreen | ( | const MString & | targetName | ) | const |
Acquire an instance of a render target with the same characteristics as the current on-screen target.
When the object is no longer needed, MRenderTargetManager::releaseTarget() should be called to notify the target manager that the caller is done with the render target. releaseTarget() will delete the target after which it is no longer safe to use.
If a target with the same identifier already exists then no new target will be created as render targets cannot be instanced. A NULL value will be returned.
The new target will be given the current on-screen render target properties (width, heigth, format), and will be filled by its content.
[in] | targetName | Name of the target |
bool formatSupportsSRGBWrite | ( | ::MHWRender::MRasterFormat | format | ) | const |
This method will perform a check to determine whether gamma correction can be performed by the GPU when writing pixels to a render target of a given format.
Hardware support assumes a gamma value of 2.2 which is equivalent to converting to sRGB space. Thus, the capability of the render target is often referred as supporting "sRGB write".
[in] | format | Render target format to check |
void releaseRenderTarget | ( | const MRenderTarget * | target | ) | const |
Deletes the MRenderTarget and releases the reference to the underlying target which is held by the MRenderTarget object.
After calling this method it is an error to try to use the MRenderTarget and attempting to do so will result in instability. The underlying target might not be deleted immediately if it is in use by the renderer.
[in] | target | The target to release |
|
static |
Returns the name of this class.