|
0 A.D. | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Class ModelVertexRenderer: Normal ModelRenderer implementations delegate vertex array management and vertex transformation to an implementation of ModelVertexRenderer. ModelVertexRenderer implementations should be designed so that one instance of the implementation can be used with more than one ModelRenderer simultaneously.
Constructor Summary | |
virtual ~ModelVertexRenderer()
|
Method Summary | |
virtual void |
BeginPass( uint streamflags, const CMatrix3D* texturematrix )= 0
BeginPass: Setup global OpenGL state for this ModelVertexRenderer. |
virtual void* |
CreateModelData( CModel* model )= 0
CreateModelData: Create internal data for one model. |
virtual void |
DestroyModelData( CModel* model, void* data )= 0
DestroyModelData: Release all per-model data that has been allocated by CreateModelData or UpdateModelData. |
virtual void |
EndPass( uint streamflags )= 0
EndPass: Cleanup OpenGL state set up by BeginPass. |
virtual void |
PrepareModelDef( uint streamflags, CModelDefPtr def )= 0
PrepareModelDef: Setup OpenGL state for rendering of models that use the given CModelDef object as base. |
virtual void |
RenderModel( uint streamflags, CModel* model, void* data )= 0
RenderModel: Invoke the rendering commands for the given model. |
virtual void |
UpdateModelData( CModel* model, void* data, u32 updateflags )= 0
UpdateModelData: Calculate per-model data for each frame. |
Constructor Detail |
public virtual ~ModelVertexRenderer();
Method Detail |
public virtual void BeginPass( uint streamflags, const CMatrix3D* texturematrix )= 0;
streamflags
- Vertex streams required by the fragment stage.
texturematrix
- if texgen is requested in streamflags, this points to the
texture matrix that must be used to transform vertex positions into texture
coordinatespublic virtual void* CreateModelData( CModel* model )= 0;
model
- The model.public virtual void DestroyModelData( CModel* model, void* data )= 0;
model
- The model.
data
- Private data as returned by CreateModelData.public virtual void EndPass( uint streamflags )= 0;
streamflags
- Vertex streams required by the fragment stage.
This equals the streamflags parameter passed on the last call to
BeginPass.public virtual void PrepareModelDef( uint streamflags, CModelDefPtr def )= 0;
streamflags
- Vertex streams required by the fragment stage.
This equals the streamflags parameter passed on the last call to
BeginPass.
def
- The model definition.public virtual void RenderModel( uint streamflags, CModel* model, void* data )= 0;
streamflags
- Vertex streams required by the fragment stage.
This equals the streamflags parameter passed on the last call to
BeginPass.
model
- The model that should be rendered.
data
- Private data for the model as returned by CreateModelData.
postconditions : Subsequent calls to RenderModel for models
that use the same CModelDef object and the same texture must
succeed.public virtual void UpdateModelData( CModel* model, void* data, u32 updateflags )= 0;
model
- The model.
data
- Private data as returned by CreateModelData.
updateflags
- Flags indicating which data has changed during
the frame. The value is the same as the value of the model's
CRenderData::m_UpdateFlags.
|
0 A.D.
Generated on September 04, 2007 at 18:14 CppDoc v2.4.0 |
|||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |