Class which manages texture.
#include <MTextureManager.h>
Public Member Functions |
|
MStatus | addImagePath (const MString &path) |
This method adds an additional search path
for looking up images on disk. |
|
MStatus | imagePaths (MStringArray &paths) const |
The current set of image search paths can be
retrieved using this method. |
|
MTexture * | acquireTexture (const MString &filePath) |
Ask the renderer to acquire a hardware
texture. |
|
MTexture * | acquireTexture (const MString &textureName, const MPlug &plug, int width, int height) |
Ask the renderer to acquire a hardware
texture. |
|
MTexture * | acquireTexture (const MString &textureName, const MHWRender::MTextureDescription &textureDesc, const void *pixelData) |
Ask the renderer to acquire a hardware
texture by providing a texture description and a block of system
memory data which matches the texture description. |
|
Static Public Member Functions |
|
static const char * | className () |
Returns the name of this class. |
This method adds an additional search path for looking up images on disk.
[in] | path | Image search path. |
MStatus imagePaths | ( | MStringArray & | paths | ) | const |
The current set of image search paths can be retrieved using this method.
[out] | paths | A string array to be filled in with image path strings. Each array element will contain one image path string. |
Ask the renderer to acquire a hardware texture.
The input data is read from an image file.
The renderer will add 1 reference to this texture on creation. If the texture has already been acquired then no new texture will be created, and a new reference will be added.
[in] | textureName | Image file name |
MTexture * acquireTexture | ( | const MString & | textureName, |
const MPlug & | plug, | ||
int | width, | ||
int | height | ||
) |
Ask the renderer to acquire a hardware texture.
The input data is a plug
The renderer will add 1 reference to this texture on creation. If the texture has already been acquired then no new texture will be created, and a new reference will be added.
[in] | textureName | Name of the texture to create |
[in] | plug | Plug which is attached with a texture |
[in] | width | Width of the texture |
[in] | height | Height of the texture |
MTexture * acquireTexture | ( | const MString & | textureName, |
const MHWRender::MTextureDescription & | textureDesc, | ||
const void * | pixelData | ||
) |
Ask the renderer to acquire a hardware texture by providing a texture description and a block of system memory data which matches the texture description.
The renderer will add 1 reference to this texture on creation. If the texture has already been acquired then no new texture will be created, and a new reference will be added.
The creation of a new texture involves copying the block of system memory data to a hardware texture. The caller is free to deallocate the system memory as the renderer itself does not keep any references to it.
[in] | textureName | Name of the texture to create |
[in] | textureDesc | Description of the texture |
[in] | pixelData | Block of system memory data which matches the texture description |
const char * className | ( | ) | [static] |