This reference page is linked to from the following overview topics: Low-level Device API.
#include <BaseMaterialHandle.h>
This is base graphics material class.
A material describes how to render the surface of an object. This class, and all its derived classes, are used for viewport display and Quicksilver. The difference between BaseMaterialHandle and ISimpleMaterial is that BaseMaterialHandle is used by RenderItemHandle::SetCustomMaterial() to describes the surface and ISimpleMaterial is used for Mtl and Texmap to display.
Public Member Functions |
|
GraphicsDriverAPI | BaseMaterialHandle () |
GraphicsDriverAPI | BaseMaterialHandle (const BaseMaterialHandle &from) |
GraphicsDriverAPI BaseMaterialHandle & |
operator= (const BaseMaterialHandle &from) |
virtual GraphicsDriverAPI | ~BaseMaterialHandle () |
virtual
GraphicsDriverAPI const MaterialRequiredStreams * |
GetRequiredStreams () const |
Returns the material required streams to
tell how to setup mesh data. |
|
GraphicsDriverAPI void | Activate (DrawContext &drawContext) |
Activates the material handle with the
specified pipeline context. |
|
GraphicsDriverAPI void | Terminate () |
Terminates the material handle, performing
any cleanup required by the material handle. |
|
GraphicsDriverAPI unsigned int | GetPassCount (DrawContext &drawContext) const |
Retrieves the number of passes required to
render the material handle. |
|
GraphicsDriverAPI void | ActivatePass (DrawContext &drawContext, unsigned int pass) |
Activates the specified pass of the material
handle, at which point it may render geometry as necessary for the
pass. |
|
GraphicsDriverAPI void | PassesFinished (DrawContext &drawContext) |
Called after all of the passes for the
material handle have been drawn. |
GraphicsDriverAPI BaseMaterialHandle | ( | ) |
GraphicsDriverAPI BaseMaterialHandle | ( | const BaseMaterialHandle & | from | ) |
virtual GraphicsDriverAPI ~BaseMaterialHandle | ( | ) | [virtual] |
GraphicsDriverAPI BaseMaterialHandle& operator= | ( | const BaseMaterialHandle & | from | ) |
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.
Reimplemented in HLSLMaterialHandle, SolidColorMaterialHandle, StandardMaterialHandle, TextureMaterialHandle, and VertexColorMaterialHandle.
GraphicsDriverAPI void Activate | ( | DrawContext & | drawContext | ) |
Activates the material handle with the specified pipeline context.
[in] | drawContext | The pipeline context. |
GraphicsDriverAPI void Terminate | ( | ) |
Terminates the material handle, performing any cleanup required by the material handle.
GraphicsDriverAPI unsigned int GetPassCount | ( | DrawContext & | drawContext | ) | const |
Retrieves the number of passes required to render the material handle.
Each geometry to be drawn with the effect must be drawn that number of times. This pass count can only be retrieved while the effect is active.
[in] | drawContext | The pipeline context. |
GraphicsDriverAPI void ActivatePass | ( | DrawContext & | drawContext, |
unsigned int | pass | ||
) |
Activates the specified pass of the material handle, at which point it may render geometry as necessary for the pass.
[in] | drawContext | The pipeline context. |
[in] | pass | The index of pass. |
GraphicsDriverAPI void PassesFinished | ( | DrawContext & | drawContext | ) |
Called after all of the passes for the material handle have been drawn.
[in] | drawContext | The pipeline context. |