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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# MTexture Class Reference

# OpenMayaRender - API module for rendering

Search for all occurrences

## Detailed Description

Class which includes texture data.

Examples:

  hwPhongShader.cpp.

`#include <MTextureManager.h>`

List of all members.

## Public Member Functions
| ~MTexture ()
| Decrease the reference count of the internal texture.
void * | resourceHandle () const
| This method allows access to the draw API dependent handle for a texture.
const MString & | name () const
| Get the name of the texture.
void | textureDescription (MTextureDescription &desc) const
| Get texture description.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.

## Constructor & Destructor Documentation

~MTexture | ( |  | ) |

Decrease the reference count of the internal texture.

When the texture is not used by any renderable objects, it will automatically be deleted.

## Member Function Documentation

void * resourceHandle | ( |  | ) | const

Search for all occurrences

This method allows access to the draw API dependent handle for a texture.

This handle is owned by the renderer and is provided to allow access to use a texture as a read-only object.

Modifications should never be performed on this texture.

Any modifications to the texture may result in unpredictable stability as the renderer no longer has knowledge of the texture contents.

For OpenGL, a pointer to an OpenGL texture identifier is returned.

Returns:
  A pointer (handle) to the texture if successful, otherwise NULL.

const MString & name | ( |  | ) | const

Search for all occurrences

Get the name of the texture.

Returns:
  The name of the texture

void textureDescription | ( | MTextureDescription & | desc | ) | const

Search for all occurrences

Get texture description.

Parameters:

  [out] | desc | The texture description

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  Name of this class.

MTexture MTexture MTexture MTexture MTexture MTexture MTexture MTexture MTexture MTexture
MTexture MTexture MTexture MTexture MTexture MTexture MTexture MTexture MTexture MTexture