Changeset View
Changeset View
Standalone View
Standalone View
source/renderer/ModelVertexRenderer.h
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | public: | ||||
* | * | ||||
* @param streamflags Vertex streams required by the fragment stage. | * @param streamflags Vertex streams required by the fragment stage. | ||||
* This equals the streamflags parameter passed on the last call to | * This equals the streamflags parameter passed on the last call to | ||||
* BeginPass. | * BeginPass. | ||||
* @param def The model definition. | * @param def The model definition. | ||||
*/ | */ | ||||
virtual void PrepareModelDef(const CShaderProgramPtr& shader, int streamflags, const CModelDef& def) = 0; | virtual void PrepareModelDef(const CShaderProgramPtr& shader, int streamflags, const CModelDef& def) = 0; | ||||
virtual bool CanInstance() { return false; } | |||||
/** | /** | ||||
* RenderModel: Invoke the rendering commands for the given model. | * RenderModel: Invoke the rendering commands for the given model. | ||||
* | * | ||||
* ModelRenderer implementations must call this function to perform | * ModelRenderer implementations must call this function to perform | ||||
* the actual rendering. | * the actual rendering. | ||||
* | * | ||||
* preconditions : The most recent call to PrepareModelDef since | * preconditions : The most recent call to PrepareModelDef since | ||||
* BeginPass has been for model->GetModelDef(). | * BeginPass has been for model->GetModelDef(). | ||||
* | * | ||||
* @param streamflags Vertex streams required by the fragment stage. | * @param streamflags Vertex streams required by the fragment stage. | ||||
* This equals the streamflags parameter passed on the last call to | * This equals the streamflags parameter passed on the last call to | ||||
* BeginPass. | * BeginPass. | ||||
* @param model The model that should be rendered. | * @param model The model that should be rendered. | ||||
* @param data Private data for the model as returned by CreateModelData. | * @param data Private data for the model as returned by CreateModelData. | ||||
* | * | ||||
* postconditions : Subsequent calls to RenderModel for models | * postconditions : Subsequent calls to RenderModel for models | ||||
* that use the same CModelDef object and the same texture must | * that use the same CModelDef object and the same texture must | ||||
* succeed. | * succeed. | ||||
*/ | */ | ||||
virtual void RenderModel(const CShaderProgramPtr& shader, int streamflags, CModel* model, CModelRData* data) = 0; | virtual void RenderModel(const CShaderProgramPtr& shader, int streamflags, CModel* model, CModelRData* data) = 0; | ||||
virtual void RenderInstancedModel(const CShaderProgramPtr& shader, const std::vector<CModel*>& model) {}; | |||||
}; | }; | ||||
#endif // INCLUDED_MODELVERTEXRENDERER | #endif // INCLUDED_MODELVERTEXRENDERER |
Wildfire Games · Phabricator