This reference page is linked to from the following overview topics: Extension for Autodesk Maya 2013.
Utilities for Viewport 2.0.
This class is a utility class for rendering in Viewport 2.0
#include <MRenderUtilities.h>
Static Public Member Functions | |
| static MDrawContext * | acquireSwatchDrawContext () |
| Acquire a draw context fit for rendering a swatch. | |
| static MDrawContext * | acquireUVTextureDrawContext () |
| Acquire a draw context fit for rendering a texture for the UV texture editor. | |
| static void | swatchBackgroundColor (float &r, float &g, float &b, float &a) |
| This method returns the default background color for the hardware rendered swatch. | |
| static MStatus | blitTargetToImage (const MRenderTarget *target, MImage &image) |
| Copy the data from a target to an image. | |
| static MStatus | blitTargetToGL (const MRenderTarget *target, const float region[2][2], bool unfiltered) |
| Blit the data from a target to current GL context. | |
| static const char * | className () |
| Returns the name of this class. | |
| MDrawContext * acquireSwatchDrawContext | ( | ) | [static] |
Acquire a draw context fit for rendering a swatch.
The user is responsible for releasing the draw context when it is no longer needed, by calling MRenderUtilities::releaseDrawContext().
| MDrawContext * acquireUVTextureDrawContext | ( | ) | [static] |
Acquire a draw context fit for rendering a texture for the UV texture editor.
The user is responsible for releasing the draw context when it is no longer needed, by calling MRenderUtilities::releaseDrawContext().
| void swatchBackgroundColor | ( | float & | r, |
| float & | g, | ||
| float & | b, | ||
| float & | a | ||
| ) | [static] |
This method returns the default background color for the hardware rendered swatch.
| [out] | r | The value for the red component. |
| [out] | g | The value for the green component. |
| [out] | b | The value for the blue component. |
| [out] | a | The value for the alpha component. |
| MStatus blitTargetToImage | ( | const MRenderTarget * | target, |
| MImage & | image | ||
| ) | [static] |
Copy the data from a target to an image.
Only 2D targets and targets with the following formats are supported
| [in] | target | The source target to get the data from. |
| [in] | image | The destination image to copy the data to. |
| MStatus blitTargetToGL | ( | const MRenderTarget * | target, |
| const float | region[2][2], | ||
| bool | unfiltered | ||
| ) | [static] |
Blit the data from a target to current GL context.
Only 2D targets and targets with the following formats are supported
| [in] | target | The source target to get the data from. |
| [in] | region | Rectangular region to be rendered. |
| [in] | unfiltered | Render with hardware filtering or sharply defined pixels. |
| const char * className | ( | ) | [static] |