MD3D9Renderer Class Reference
[OpenMayaRender - API module for rendering]

#include <MD3D9Renderer.h>

Collaboration diagram for MD3D9Renderer:

Collaboration graph
[legend]

List of all members.


Detailed Description

Access DirectX utility class.

MD3D9Renderer is a wrapper class to provide access to Maya's DirectX resources.

Examples:

hlslShader.cpp.


Public Member Functions

MStatus makeSwatchContextCurrent (unsigned int &width, unsigned int &height)
MStatus setBackgroundColor (const MColor &color)
MStatus readSwatchContextPixels (MImage &image)

Static Public Member Functions

static MD3D9RenderertheRenderer ()

Member Function Documentation

MStatus MD3D9Renderer::makeSwatchContextCurrent ( unsigned int &  width,
unsigned int &  height 
)

Create a directX render target (or context) to render into for swatches.

Parameters:
[out] width The width of the swatch image.
[out] height The height of the swatch image.
Returns:
Examples:

MStatus MD3D9Renderer::setBackgroundColor ( const MColor color  ) 

Set the back ground color of the swatch. This clear the reading buffer as well.

Parameters:
[in] color The color to which the backgorund color will be set.
Returns:
Examples:

MStatus MD3D9Renderer::readSwatchContextPixels ( MImage image  ) 

Reads out the current swatch context color buffer into an image format.

Parameters:
[in] image The image to copy the swatch into
Returns:
Examples:

MD3D9Renderer * MD3D9Renderer::theRenderer (  )  [static]

Returns a static pointer to the hardware renderer wrapper class.

Returns:
Pointer to a MD3D9Renderer.
Examples:


Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6