VertexColorMaterialHandle Class Reference
 
 
 
VertexColorMaterialHandle Class Reference

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


#include <VertexColorMaterialHandle.h>

Inheritance diagram for VertexColorMaterialHandle:
BaseMaterialHandle SmartHandle Noncopyable MaxHeapOperators

Class Description

VertexColorMaterialHandle is a material class to support vertex color.

This class is used for viewport display and Quicksilver. It's used by RenderItemHandle::SetCustomMaterial() to describe the vertex color surface. How to use:

VertexColorMaterialHandle hMaterial;
hMaterial.Initialize();
pItem->SetCustomMaterial(hMaterial); // pItem is an instance of RenderItemHandle

Public Member Functions

GraphicsDriverAPI  VertexColorMaterialHandle ()
GraphicsDriverAPI  VertexColorMaterialHandle (const VertexColorMaterialHandle &from)
GraphicsDriverAPI
VertexColorMaterialHandle
operator= (const VertexColorMaterialHandle &from)
virtual GraphicsDriverAPI  ~VertexColorMaterialHandle ()
GraphicsDriverAPI bool  Initialize ()
  Initialize the instance of vertex color material.
virtual GraphicsDriverAPI
const MaterialRequiredStreams
GetRequiredStreams () const
  Returns the material required streams to tell how to setup mesh data.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Initialize the instance of vertex color material.

A VertexColorMaterialHandle should be initialized before it's used.

Returns:
true if successfully initialized, false otherwise.
virtual GraphicsDriverAPI const MaterialRequiredStreams* GetRequiredStreams ( ) const [virtual]

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

When a BaseMaterialHandle is used by RenderItemHandle::SetCustomMaterial(), it also needs to know about the material requirement streams to setup corresponding mesh data. It could be used by GenerateRenderItems::GenerateRenderItems() for RenderItemHandle.

Returns:
the material required streams.

Reimplemented from BaseMaterialHandle.