Public Member Functions | Static Public Member Functions

MD3D9Renderer Class Reference

Search for all occurrences

Detailed Description

Access DirectX utility class.

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

Examples:

hlslShader.cpp.

#include <MD3D9Renderer.h>

List of all members.

Public Member Functions

MStatus makeSwatchContextCurrent (unsigned int &width, unsigned int &height)
 Create a directX render target (or context) to render into for swatches.
MStatus setBackgroundColor (const MColor &color)
 Set the back ground color of the swatch.
MStatus readSwatchContextPixels (MImage &image)
 Reads out the current swatch context color buffer into an image format.

Static Public Member Functions

static MD3D9RenderertheRenderer ()
 Returns a static pointer to the hardware renderer wrapper class.

Member Function Documentation

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

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

Parameters:
[out]widthThe width of the swatch image.
[out]heightThe height of the swatch image.
Returns:
Examples:
hlslShader.cpp.
MStatus setBackgroundColor ( const MColor color)

Set the back ground color of the swatch.

This clear the reading buffer as well.

Parameters:
[in]colorThe color to which the backgorund color will be set.
Returns:
Examples:
hlslShader.cpp.
MStatus readSwatchContextPixels ( MImage image)

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

Parameters:
[in]imageThe image to copy the swatch into
Returns:
Examples:
hlslShader.cpp.
MD3D9Renderer * theRenderer ( ) [static]

Returns a static pointer to the hardware renderer wrapper class.

Returns:
Pointer to a MD3D9Renderer.
Examples:
hlslShader.cpp.

MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer
MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer MD3D9Renderer