ProcessedFFMaterial
Engine/source/materials/processedFFMaterial.h
Fixed function rendering.
Classes:
Render state setting
setTextureStages(SceneRenderState * , const SceneData & sgData, U32 pass)
Sets necessary textures and texture ops for rendering.
setTransforms(const MatrixSet & matrixSet, SceneRenderState * state, const U32 pass)
Sets the transformation matrix, i.e. Model * View * Projection.
setSceneInfo(SceneRenderState * , const SceneData & sgData, U32 pass)
Sets the scene info like lights for the given pass.
Internal functions
_addPass(U32 stageNum, FixedFuncFeatureData & featData)
Adds a pass for the given stage.
Chooses a blend op for the pass during pass creation.
_createPasses(U32 stageNum, const FeatureSet & features)
Creates all necessary passes for the given stage.
_determineFeatures(U32 stageNum, FixedFuncFeatureData & featData, const FeatureSet & features)
Determine what features we need.
_setPrimaryLightInfo(const MatrixF & objTrans, LightInfo * light, U32 pass)
Sets light info for the first light.
_setSecondaryLightInfo(const MatrixF & objTrans, LightInfo * light)
Sets light info for the second light.
_initPassStateBlock(RenderPassData * rpd, GFXStateBlockDesc & result)
Does the base render state block setting, normally per pass.
Private Types
Parent
Protected Attributes
Public Functions
ProcessedFFMaterial(Material & mat, const bool isLightingMaterial)
Returns the number of stages we're using (not to be confused with the number of passes)
bool
init(const FeatureSet & features, const GFXVertexFormat * vertexFormat, const MatFeaturesDelegate & featuresDelegate)
Initializes us (eg. loads textures, creates passes, generates shaders)
bool
setupPass(SceneRenderState * , const SceneData & sgData, U32 pass)
Sets up the given pass.
Protected Functions
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.
Render state setting
setTextureStages(SceneRenderState * , const SceneData & sgData, U32 pass)
Reimplemented from: ProcessedMaterial
allocMaterialParameters()
Reimplemented from: ProcessedMaterial
getMaterialParameterHandle(const String & name)
Reimplemented from: ProcessedMaterial
getDefaultMaterialParameters()
Reimplemented from: ProcessedMaterial
setTransforms(const MatrixSet & matrixSet, SceneRenderState * state, const U32 pass)
Reimplemented from: ProcessedMaterial
setSceneInfo(SceneRenderState * , const SceneData & sgData, U32 pass)
Reimplemented from: ProcessedMaterial
Internal functions
_addPass(U32 stageNum, FixedFuncFeatureData & featData)
Adds a pass for the given stage.
_setPassBlendOp()
Chooses a blend op for the pass during pass creation.
_createPasses(U32 stageNum, const FeatureSet & features)
Creates all necessary passes for the given stage.
_determineFeatures(U32 stageNum, FixedFuncFeatureData & featData, const FeatureSet & features)
Determine what features we need.
_setPrimaryLightInfo(const MatrixF & objTrans, LightInfo * light, U32 pass)
Sets light info for the first light.
_setSecondaryLightInfo(const MatrixF & objTrans, LightInfo * light)
Sets light info for the second light.
_initPassStateBlock(RenderPassData * rpd, GFXStateBlockDesc & result)
Reimplemented from: ProcessedMaterial
Private Types
typedef ProcessedMaterial Parent
Protected Attributes
MaterialParameterHandle * mDefaultHandle
MaterialParameters * mDefaultParameters
bool mIsLightingMaterial
Vector< GFXShaderConstDesc > mParamDesc
Public Functions
ProcessedFFMaterial()
ProcessedFFMaterial(Material & mat, const bool isLightingMaterial)
~ProcessedFFMaterial()
getNumStages()
Reimplemented from: ProcessedMaterial
init(const FeatureSet & features, const GFXVertexFormat * vertexFormat, const MatFeaturesDelegate & featuresDelegate)
Reimplemented from: ProcessedMaterial
setupPass(SceneRenderState * , const SceneData & sgData, U32 pass)
Reimplemented from: ProcessedMaterial
