28#ifndef __InstanceBatchHW_VTF_H__
29#define __InstanceBatchHW_VTF_H__
Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) This implementation...
A viewpoint from which the scene will be rendered.
Shared pointer implementation used to share vertex buffers.
Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) and hardware instan...
This is the main starting point for the new instancing system.
Class to manage the scene object rendering queue.
Reference-counted shared pointer, used for objects where implicit destruction is required.
Defines a part of a complete mesh.
Summary class collecting together vertex source information.
size_t calculateMaxNumInstances(const SubMesh *baseSubMesh, uint16 flags) const
virtual void _updateRenderQueue(RenderQueue *queue)
Overloaded to visibility on a per unit basis and finally updated the vertex texture.
virtual size_t updateInstanceDataBuffer(bool isFirstTime, Camera *currentCamera)
updates the vertex buffer containing the per instance data
void createVertexSemantics(VertexData *thisVertexData, VertexData *baseVertexData, const HWBoneIdxVec &hwBoneIdx, const HWBoneWgtVec &hwBoneWgt)
Creates 2 TEXCOORD semantics that will be used to sample the vertex texture.
void setupVertices(const SubMesh *baseSubMesh)
virtual bool checkSubMeshCompatibility(const SubMesh *baseSubMesh)
Returns false on errors that would prevent building this batch from the given submesh.
vector< float >::type HWBoneWgtVec
bool isStatic() const
Returns true if this batch was set as static.
void setStaticAndUpdate(bool bStatic)
size_t updateVertexTexture(Camera *currentCamera)
Keeps filling the VTF with world matrix data.
vector< uint8 >::type HWBoneIdxVec
virtual bool matricesTogetherPerRow() const
Affects VTF texture's width dimension.
void _boundsDirty(void)
Overloaded so that we don't perform needless updates when in static mode.
virtual ~InstanceBatchHW_VTF()
InstanceBatchHW_VTF(InstanceManager *creator, MeshPtr &meshReference, const MaterialPtr &material, size_t instancesPerBatch, const Mesh::IndexMap *indexToBoneMap, const String &batchName)
void setupIndices(const SubMesh *baseSubMesh)
HardwareVertexBufferSharedPtr mInstanceVertexBuffer