This reference page is linked to from the following overview topics: Low-level Device API.
#include <TextureMaterialHandle.h>
This is material class to support material with texture.
How to use:
TextureMaterialHandle hMaterial hMaterial.Initialize(); hMaterial.SetTexture(hTexture); // hTexture is an instance of TextureHandle pItem->SetCustomMaterial(hMaterial); // pItem is an instance of RenderItemHandle
Public Member Functions |
|
GraphicsDriverAPI | TextureMaterialHandle () |
GraphicsDriverAPI | TextureMaterialHandle (const TextureMaterialHandle &from) |
GraphicsDriverAPI TextureMaterialHandle & |
operator= (const TextureMaterialHandle &from) |
virtual GraphicsDriverAPI | ~TextureMaterialHandle () |
GraphicsDriverAPI bool | Initialize () |
Initialize an instance of texture material.
|
|
GraphicsDriverAPI void | SetTexture (const BaseRasterHandle &hTexture) |
Specifies a texture handle. |
|
GraphicsDriverAPI BaseRasterHandle | GetTexture () const |
Returns the texture handle. |
|
GraphicsDriverAPI void | SetTextureMapChannel (int channelID) |
Specifies texture map channel ID. |
|
GraphicsDriverAPI int | GetTextureMapChannel () |
Returns the texture map channel ID. |
|
virtual
GraphicsDriverAPI const MaterialRequiredStreams * |
GetRequiredStreams () const |
Returns the material required streams to
tell how to setup mesh data. |
GraphicsDriverAPI TextureMaterialHandle | ( | ) |
GraphicsDriverAPI TextureMaterialHandle | ( | const TextureMaterialHandle & | from | ) |
virtual GraphicsDriverAPI ~TextureMaterialHandle | ( | ) | [virtual] |
GraphicsDriverAPI TextureMaterialHandle& operator= | ( | const TextureMaterialHandle & | from | ) |
GraphicsDriverAPI bool Initialize | ( | ) |
Initialize an instance of texture material.
A TextureMaterialHandle should be initialized before it's used.
GraphicsDriverAPI void SetTexture | ( | const BaseRasterHandle & | hTexture | ) |
Specifies a texture handle.
[in] | hTexture | the texture handle. |
GraphicsDriverAPI BaseRasterHandle GetTexture | ( | ) | const |
GraphicsDriverAPI void SetTextureMapChannel | ( | int | channelID | ) |
Specifies texture map channel ID.
Change of texture map channel ID will change the MaterialRequiredStreams.
[in] | channelID | the texture map channel ID. |
GraphicsDriverAPI int GetTextureMapChannel | ( | ) |
virtual GraphicsDriverAPI const MaterialRequiredStreams* GetRequiredStreams | ( | ) | const [virtual] |
Returns the material required streams to tell how to setup mesh data.
Reimplemented from BaseMaterialHandle.