- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions

# MRenderProfile Class Reference
OpenMayaRender - API module for rendering

Search for all occurrences

## Detailed Description

Render profile.

The MRenderProfile class describes the rendering APIs and algorithms supported by a given rendering entity (e.g. a shading node, a renderer). A single profile can contain multiple entries allowing, for example, a shading node to specify that it supports both OpenGL and Direct3D rendering. The profile entries refer to renderers rather than rendering APIs as the rendering elements may depend on specific services, information or algorithms implemented by the renderer (e.g. a global light table, or render state cache).

Examples:

  D3DViewportRenderer.cpp, hlslShader.cpp, and hlslShader.h.

`#include <MRenderProfile.h>`

List of all members.

## Public Types
enum | MStandardRenderer { kMayaSoftware, kMayaOpenGL, kMayaD3D }
| Maya's internal renderers. More...
## Public Member Functions
| MRenderProfile ()
| Create a new empty render profile.
| ~MRenderProfile ()
| Class destructor.
unsigned int | numberOfRenderers () const
| Find the number of renderers in this profile.
void | addRenderer (MStandardRenderer renderer)
| Add one of Maya's internal renderers to this render profile.
void | addRenderer (const MString &name, float version)
| Add a custom entry to this render profile.
bool | hasRenderer (MStandardRenderer renderer) const
| See if a Maya renderer is listed in this profile.
bool | hasRenderer (const MString &name, float version) const
| Find a custom entry in this render profile.

## Member Enumeration Documentation

enum MStandardRenderer

Search for all occurrences

Maya's internal renderers.

Enumerator:

  kMayaSoftware | Search for all occurrences
  kMayaOpenGL | Search for all occurrences
  kMayaD3D | Search for all occurrences

## Member Function Documentation

unsigned int numberOfRenderers | ( |  | ) | const

Search for all occurrences

Find the number of renderers in this profile.

Returns:
  The number of renderers.

void addRenderer | ( | MStandardRenderer | renderer | ) |

Search for all occurrences

Add one of Maya's internal renderers to this render profile.

Parameters:

  [in] | renderer | The internal Maya renderer to add to this profile.

void addRenderer | ( | const MString & | name,
|  | float | version
| ) |  |

Search for all occurrences

Add a custom entry to this render profile.

The name and version specified must correspond to a renderer registered with Maya. Currently, only Maya's internal renderers (just named after the APIs they use: "OpenGL", "D3D", or "Software") are supported. When registering support for Maya's internal renderers, it's simpler to use the other version of this method.

Parameters:

  [in] | name | The name of the renderer.
  [in] | version | The version of the renderer or rendering API.

bool hasRenderer | ( | MStandardRenderer | renderer | ) | const

Search for all occurrences

See if a Maya renderer is listed in this profile.

Parameters:

  [in] | renderer | The internal Maya renderer to search for

Examples:
  D3DViewportRenderer.cpp.

bool hasRenderer | ( | const MString & | name,
|  | float | version
| ) |  | const

Search for all occurrences

Find a custom entry in this render profile.

Parameters:

  [in] | name | The name of the renderer.
  [in] | version | The version of the renderer or rendering API.

MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile
MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile MRenderProfile