ProcessedFFMaterial Class Reference

#include <processedFFMaterial.h>

Inheritance diagram for ProcessedFFMaterial:

Inheritance graph
[legend]
List of all members.

Detailed Description

Fixed function rendering.

Does not load or use shaders. Does not rely on GFXMaterialFeatureData. Tries very hard to not rely on anything possibly related to shaders.

Note:
Does not always succeed.


Public Member Functions

 ProcessedFFMaterial ()
 ProcessedFFMaterial (Material &mat, const bool isLightingMaterial=false)
 ~ProcessedFFMaterial ()
virtual void init (const GFXMaterialFeatureData::FeatureListHandle &features, GFXVertexFlags vertFlags)
 Creates necessary passes, blend ops, etc.
virtual bool setupPass (SceneState *, const SceneGraphData &sgData, U32 pass)
 Sets up the given pass.
virtual U32 getNumStages ()
 Returns the number of stages we're using (not to be confused with the number of passes).
virtual void cleanup (U32 pass)
 Undoes all state changes for the given pass (or will anyways).
Render state setting
virtual void setTextureStages (SceneState *, const SceneGraphData &sgData, U32 pass)
 Sets necessary textures and texture ops for rendering.
virtual MaterialParametersallocMaterialParameters ()
virtual MaterialParameterHandlegetMaterialParameterHandle (const String &name)
virtual MaterialParametersgetDefaultMaterialParameters ()
virtual void setTransforms (const MatrixF &world, const MatrixF &view, const MatrixF &projection, const U32 pass)
 Sets the transformation matrix, i.e. Model * View * Projection.
virtual void setLightInfo (SceneState *, const SceneGraphData &sgData, U32 pass)
 Sets the light info for the given pass.
virtual void setEyePosition (MatrixF objTrans, Point3F position, U32 pass)
 Sets the eye position.

Protected Member Functions

void _construct ()
Internal functions
virtual void _addPass (U32 stageNum, FixedFuncFeatureData &featData)
 Adds a pass for the given stage.
virtual void _setPassBlendOp ()
 Chooses a blend op for the pass during pass creation.
void _createPasses (U32 stageNum, const GFXMaterialFeatureData::FeatureListHandle &features)
 Creates all necessary passes for the given stage.
void _determineFeatures (U32 stageNum, FixedFuncFeatureData &featData, const GFXMaterialFeatureData::FeatureListHandle &features)
 Determine what features we need.
virtual void _setStageData ()
 Loads all the textures for all of the stages in the Material.
virtual void _setPrimaryLightInfo (MatrixF objTrans, LightInfo *light, U32 pass)
 Sets light info for the first light.
virtual void _setSecondaryLightInfo (MatrixF objTrans, LightInfo *light)
 Sets light info for the second light.
virtual void _initPassStateBlock (const Material::BlendOp blendOp, U32 numTex, const U32 texFlags[Material::MAX_TEX_PER_PASS], GFXStateBlockDesc &result)
 Does the base render state block setting, normally per pass.

Protected Attributes

MaterialParameterHandlemDefaultHandle
MaterialParametersmDefaultParameters
bool mIsLightingMaterial
Vector< GFXShaderConstDescmParamDesc

Private Types

typedef ProcessedMaterial Parent

Classes

struct  FixedFuncFeatureData


Member Typedef Documentation


Constructor & Destructor Documentation

ProcessedFFMaterial::ProcessedFFMaterial (  ) 

ProcessedFFMaterial::ProcessedFFMaterial ( Material mat,
const bool  isLightingMaterial = false 
)

ProcessedFFMaterial::~ProcessedFFMaterial (  ) 


Member Function Documentation

virtual void ProcessedFFMaterial::setTextureStages ( SceneState ,
const SceneGraphData sgData,
U32  pass 
) [virtual]

Sets necessary textures and texture ops for rendering.

Implements ProcessedMaterial.

virtual MaterialParameters* ProcessedFFMaterial::allocMaterialParameters (  )  [virtual]

Implements ProcessedMaterial.

virtual MaterialParameterHandle* ProcessedFFMaterial::getMaterialParameterHandle ( const String name  )  [virtual]

Implements ProcessedMaterial.

virtual MaterialParameters* ProcessedFFMaterial::getDefaultMaterialParameters (  )  [virtual]

Implements ProcessedMaterial.

virtual void ProcessedFFMaterial::setTransforms ( const MatrixF world,
const MatrixF view,
const MatrixF projection,
const U32  pass 
) [virtual]

Sets the transformation matrix, i.e. Model * View * Projection.

Implements ProcessedMaterial.

virtual void ProcessedFFMaterial::setLightInfo ( SceneState ,
const SceneGraphData sgData,
U32  pass 
) [virtual]

Sets the light info for the given pass.

Implements ProcessedMaterial.

virtual void ProcessedFFMaterial::setEyePosition ( MatrixF  objTrans,
Point3F  position,
U32  pass 
) [virtual]

Sets the eye position.

Note:
Likely to be a stub

Implements ProcessedMaterial.

virtual void ProcessedFFMaterial::init ( const GFXMaterialFeatureData::FeatureListHandle features,
GFXVertexFlags  vertFlags 
) [virtual]

Creates necessary passes, blend ops, etc.

Implements ProcessedMaterial.

virtual bool ProcessedFFMaterial::setupPass ( SceneState ,
const SceneGraphData sgData,
U32  pass 
) [virtual]

Sets up the given pass.

Returns:
false if the pass could not be set up

Implements ProcessedMaterial.

virtual U32 ProcessedFFMaterial::getNumStages (  )  [virtual]

Returns the number of stages we're using (not to be confused with the number of passes).

Implements ProcessedMaterial.

virtual void ProcessedFFMaterial::cleanup ( U32  pass  )  [virtual]

Undoes all state changes for the given pass (or will anyways).

Reimplemented from ProcessedMaterial.

virtual void ProcessedFFMaterial::_addPass ( U32  stageNum,
FixedFuncFeatureData featData 
) [protected, virtual]

Adds a pass for the given stage.

virtual void ProcessedFFMaterial::_setPassBlendOp (  )  [protected, virtual]

Chooses a blend op for the pass during pass creation.

void ProcessedFFMaterial::_createPasses ( U32  stageNum,
const GFXMaterialFeatureData::FeatureListHandle features 
) [protected]

Creates all necessary passes for the given stage.

void ProcessedFFMaterial::_determineFeatures ( U32  stageNum,
FixedFuncFeatureData featData,
const GFXMaterialFeatureData::FeatureListHandle features 
) [protected]

Determine what features we need.

virtual void ProcessedFFMaterial::_setStageData (  )  [protected, virtual]

Loads all the textures for all of the stages in the Material.

virtual void ProcessedFFMaterial::_setPrimaryLightInfo ( MatrixF  objTrans,
LightInfo light,
U32  pass 
) [protected, virtual]

Sets light info for the first light.

virtual void ProcessedFFMaterial::_setSecondaryLightInfo ( MatrixF  objTrans,
LightInfo light 
) [protected, virtual]

Sets light info for the second light.

virtual void ProcessedFFMaterial::_initPassStateBlock ( const Material::BlendOp  blendOp,
U32  numTex,
const U32  texFlags[Material::MAX_TEX_PER_PASS],
GFXStateBlockDesc result 
) [protected, virtual]

Does the base render state block setting, normally per pass.

Reimplemented from ProcessedMaterial.

void ProcessedFFMaterial::_construct (  )  [protected]


Member Data Documentation