MatStateHint

Engine/source/materials/matStateHint.h

A simple object for generating and comparing string based hints used for sorting and identifying materials uniquely by its shaders and states.

More...

Public Static Attributes

A default state hint.

Protected Attributes

An interned string of the combined material shader and state info for evert pass of the processed material.

Public Functions

Constructor.

Constructor for building special hints.

Clears the hint.

Initialize the state hint from a ProcessMaterial.

Returns a 32bit hash key used for sorting by material state.

bool

Fast comparision of state for inequality.

bool

Fast comparision of state for equality.

Detailed Description

A simple object for generating and comparing string based hints used for sorting and identifying materials uniquely by its shaders and states.

Public Static Attributes

const MatStateHint Default 

A default state hint.

Protected Attributes

String mState 

An interned string of the combined material shader and state info for evert pass of the processed material.

Public Functions

MatStateHint()

Constructor.

MatStateHint(const String & state)

Constructor for building special hints.

clear()

Clears the hint.

init(const ProcessedMaterial * mat)

Initialize the state hint from a ProcessMaterial.

This assumes that the ProcessedMaterial has properly initialized its passes to describe the material uniquely.

operator U32()

Returns a 32bit hash key used for sorting by material state.

operator!=(const MatStateHint & hint)

Fast comparision of state for inequality.

operator==(const MatStateHint & hint)

Fast comparision of state for equality.