class MHwTextureManager

Jump to documentation

Hardware Texture management (OpenMayaRender) (OpenMayaRender.py)

public members:

static MStatus glBind ( const MObject & fileTextureObject, MImageFileInfo::MHwTextureType & targetType, MImageFileInfo::MImageType imageType = MImageFileInfo::kImageTypeUnknown )
static MStatus glBind ( const MPlug & fileTextureConnection, MImageFileInfo::MHwTextureType & targetType, MImageFileInfo::MImageType imageType = MImageFileInfo::kImageTypeUnknown )

Documentation

This class provides methods for managing hardware texture resources.
Description

The MHwTextureManager provides an interface for loading and using hardware textures.

Functions

MStatus MHwTextureManager:: glBind ( const MObject & fileTextureObject, MImageFileInfo::MHwTextureType & targetType, MImageFileInfo::MImageType )

Description

Bind the contents of a file texture node to the currently active OpenGL texture unit.

Arguments

  • fileTextureObject the file texture node to bind
  • targetType the target type of the texture (e.g. 2D, cube map, etc). If the initial value of this argument is anything other than kHwTextureUnknown, this parameter acts as an input to specify the type you require, and the call will fail if the texture can not be bound to this type. If the initial value of this argument is kHwTextureUnknown, this parameter acts as a return value to let you know what type of texture has been bound.
  • imageType the type of information you are expecting in the texture (e.g. color, normal, etc). If specified, this argument may be used to tune mipmap generation.

Return Value

  • MS::kFailure if the texture cannot be bound, or is incompatible with the specified parameters
  • MS::kSuccess otherwise

MStatus MHwTextureManager:: glBind ( const MPlug & fileTextureConnection, MImageFileInfo::MHwTextureType & targetType, MImageFileInfo::MImageType )

Description

Bind the contents of a specific file texture node attribute (e.g. color, alpha) to the currently active OpenGL texture unit. As part of this operation, the texture target will also be enabled (i.e. there is no need to call glEnable( targetType) before or after calling this method).

Arguments

  • fileTextureObject the file texture node to bind
  • targetType the target type of the texture (e.g. 2D, cube map, etc). If the initial value of this argument is anything other than kHwTextureUnknown, this parameter acts as an input to specify the type you require, and the call will fail if the texture can not be bound to this type. If the initial value of this argument is kHwTextureUnknown, this parameter acts as a return value to let you know what type of texture has been bound.
  • imageType the type of information you are expecting in the texture (e.g. color, normal, etc). If specified, this argument may be used to tune mipmap generation.

Return Value

  • MS::kFailure if the texture cannot be bound, or is incompatible with the specified parameters
  • MS::kSuccess otherwise

This class has no child classes.


Autodesk® Maya® 8.0 © 1997-2006 Autodesk, Inc. All rights reserved. doc++ Copyright