TextureMaterialHandle Class Reference
 
 
 
TextureMaterialHandle Class Reference

This reference page is linked to from the following overview topics: Low-level Device API.


#include <TextureMaterialHandle.h>

Inheritance diagram for TextureMaterialHandle:
BaseMaterialHandle SmartHandle Noncopyable MaxHeapOperators

Class Description

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.

Constructor & Destructor Documentation

GraphicsDriverAPI TextureMaterialHandle ( )
GraphicsDriverAPI TextureMaterialHandle ( const TextureMaterialHandle from )
virtual GraphicsDriverAPI ~TextureMaterialHandle ( ) [virtual]

Member Function Documentation

GraphicsDriverAPI TextureMaterialHandle& operator= ( const TextureMaterialHandle from )
GraphicsDriverAPI bool Initialize ( )

Initialize an instance of texture material.

A TextureMaterialHandle should be initialized before it's used.

Returns:
true if successfully initialized, false otherwise.
GraphicsDriverAPI void SetTexture ( const BaseRasterHandle hTexture )

Specifies a texture handle.

Parameters:
[in] hTexture the texture handle.
GraphicsDriverAPI BaseRasterHandle GetTexture ( ) const

Returns the texture handle.

Returns:
the texture handle.
GraphicsDriverAPI void SetTextureMapChannel ( int  channelID )

Specifies texture map channel ID.

Change of texture map channel ID will change the MaterialRequiredStreams.

Parameters:
[in] channelID the texture map channel ID.
GraphicsDriverAPI int GetTextureMapChannel ( )

Returns the texture map channel ID.

Returns:
the texture map channel ID.
virtual GraphicsDriverAPI const MaterialRequiredStreams* GetRequiredStreams ( ) const [virtual]

Returns the material required streams to tell how to setup mesh data.

Returns:
the material required streams.

Reimplemented from BaseMaterialHandle.