24#ifndef INCLUDED_MODELRENDERER
25#define INCLUDED_MODELRENDERER
std::shared_ptr< CModelDef > CModelDefPtr
Definition: MeshManager.h:27
std::shared_ptr< RenderModifier > RenderModifierPtr
Definition: ModelRenderer.h:36
std::shared_ptr< LitRenderModifier > LitRenderModifierPtr
Definition: ModelRenderer.h:39
std::shared_ptr< ModelRenderer > ModelRendererPtr
Definition: ModelRenderer.h:45
std::shared_ptr< ModelVertexRenderer > ModelVertexRendererPtr
Definition: ModelRenderer.h:42
Class CModelRData: Render data that is maintained per CModel.
Definition: ModelRenderer.h:63
CModelRData(const void *key)
Definition: ModelRenderer.h:65
const void * GetKey() const
GetKey: Retrieve the key that can be used to identify the ModelRenderer that created this data.
Definition: ModelRenderer.h:73
const void * m_Key
The key for model renderer identification.
Definition: ModelRenderer.h:77
Definition: RenderableObject.h:41
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar condit...
Definition: ShaderDefines.h:147
Class LitRenderModifier: Abstract base class for RenderModifiers that apply a shadow map.
Definition: RenderModifiers.h:82
Class ModelRenderer: Abstract base class for all model renders.
Definition: ModelRenderer.h:106
virtual void PrepareModels()=0
PrepareModels: Calculate renderer data for all previously submitted models.
static void GenTangents(const CModelDefPtr &mdef, std::vector< float > &newVertices, bool gpuSkinning)
GenTangents: Generate tangents for the given CModelDef.
Definition: ModelRenderer.cpp:132
static void Init()
Initialise global settings.
Definition: ModelRenderer.cpp:49
virtual void Submit(int cullGroup, CModel *model)=0
Submit: Submit a model for rendering this frame.
static void BuildColor4ub(CModel *model, const VertexArrayIterator< CVector3D > &Normal, const VertexArrayIterator< SColor4ub > &Color)
BuildColor4ub: Build lighting colors for the given model, based on previously calculated world space ...
Definition: ModelRenderer.cpp:109
static void BuildPositionAndNormals(CModel *model, const VertexArrayIterator< CVector3D > &Position, const VertexArrayIterator< CVector3D > &Normal)
BuildPositionAndNormals: Build animated vertices and normals, transformed into world space.
Definition: ModelRenderer.cpp:70
virtual void EndFrame()=0
EndFrame: Remove all models from the list of submitted models.
static void BuildUV(const CModelDefPtr &mdef, const VertexArrayIterator< float[2]> &UV, int UVset)
BuildUV: Copy UV coordinates into the given vertex array.
Definition: ModelRenderer.cpp:140
virtual ~ModelRenderer()
Definition: ModelRenderer.h:109
static void CopyPositionAndNormals(const CModelDefPtr &mdef, const VertexArrayIterator< CVector3D > &Position, const VertexArrayIterator< CVector3D > &Normal)
CopyPositionAndNormals: Copy unanimated object-space vertices and normals into the given vertex array...
Definition: ModelRenderer.cpp:54
virtual void UploadModels(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)=0
Upload renderer data for all previously submitted models to backend.
static void BuildIndices(const CModelDefPtr &mdef, const VertexArrayIterator< u16 > &Indices)
BuildIndices: Create the indices array for the given CModelDef.
Definition: ModelRenderer.cpp:158
virtual void Render(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const RenderModifierPtr &modifier, const CShaderDefines &context, int cullGroup, int flags)=0
Render: Render submitted models, using the given RenderModifier to setup the fragment stage.
ModelRenderer()
Definition: ModelRenderer.h:108
Class ModelVertexRenderer: Normal ModelRenderer implementations delegate vertex array management and ...
Definition: ModelVertexRenderer.h:44
Class RenderModifier: Some ModelRenderer implementations provide vertex management behaviour but allo...
Definition: RenderModifiers.h:49
Definition: IDeviceCommandContext.h:42
Implementation of ModelRenderer that loads the appropriate shaders for rendering each model,...
Definition: ModelRenderer.h:265
ShaderModelRenderer(ModelVertexRendererPtr vertexrender)
Definition: ModelRenderer.cpp:202
~ShaderModelRenderer() override
Definition: ModelRenderer.cpp:208
void Submit(int cullGroup, CModel *model) override
Submit: Submit a model for rendering this frame.
Definition: ModelRenderer.cpp:214
void Render(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const RenderModifierPtr &modifier, const CShaderDefines &context, int cullGroup, int flags) override
Render: Render submitted models, using the given RenderModifier to setup the fragment stage.
Definition: ModelRenderer.cpp:359
ShaderModelRendererInternals * m
Definition: ModelRenderer.h:284
void UploadModels(Renderer::Backend::IDeviceCommandContext *deviceCommandContext) override
Upload renderer data for all previously submitted models to backend.
Definition: ModelRenderer.cpp:249
void EndFrame() override
EndFrame: Remove all models from the list of submitted models.
Definition: ModelRenderer.cpp:265
void PrepareModels() override
PrepareModels: Calculate renderer data for all previously submitted models.
Definition: ModelRenderer.cpp:232
Definition: VertexArray.h:31
@ Normal
Definition: CCmpRangeManager.cpp:211
Internal data of the ShaderModelRenderer.
Definition: ModelRenderer.cpp:187
pthread_key_t key
Definition: wpthread.cpp:140