Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CStandardColorInstancing Class Reference
Inheritance diagram for Skylicht::CStandardColorInstancing:
Skylicht::IShaderInstancing

Public Member Functions

virtual IVertexBuffer * createInstancingVertexBuffer ()
 Create a vertex buffer for instancing data (must be implemented by subclasses).
virtual IMeshBuffer * createMeshBuffer (video::E_INDEX_TYPE type)
 Create a mesh buffer for a specific index type (must be implemented by subclasses).
virtual void batchIntancing (IVertexBuffer *vtxBuffer, CMaterial **materials, CEntity **entities, int count)
 Batch update instancing vertex buffer with transform and material data for multiple entities (must be implemented by subclasses).
Public Member Functions inherited from Skylicht::IShaderInstancing
 IShaderInstancing ()
 Constructor. Initializes descriptors to null.
virtual ~IShaderInstancing ()
 Destructor.
virtual void setupDescriptorForRenderLighting (const char *name)
 Set up vertex descriptor for instanced rendering with lighting data. Adds necessary attributes for color, UV scaling, and world matrix.
virtual bool isSupport (IMeshBuffer *mb)
 Check if instancing is supported for the given mesh buffer. Compares vertex descriptors to base and instanced formats.
virtual bool isSupport (IMesh *mesh)
 Check if instancing is supported for the given mesh. Compares vertex descriptors for all mesh buffers.
virtual IMeshBuffer * createLinkMeshBuffer (IMeshBuffer *mb)
 Create a mesh buffer that links to the vertex and index buffers of another mesh buffer. Used for instanced rendering.
virtual bool applyInstancing (IMeshBuffer *meshbuffer, IVertexBuffer *instancingBuffer, IVertexBuffer *transformBuffer)
 Apply instancing setup to a mesh buffer, binding instancing and transform buffers.
virtual bool applyInstancingForRenderLighting (IMeshBuffer *meshbuffer, IVertexBuffer *instancingBuffer, IVertexBuffer *transformBuffer)
 Apply instancing setup for render lighting to a mesh buffer, binding buffers and using lighting descriptor.
virtual bool removeInstancing (IMeshBuffer *meshbuffer)
 Remove instancing buffers from a mesh buffer, restoring the base descriptor.
virtual bool applyInstancing (IMesh *mesh, IVertexBuffer *instancingBuffer, IVertexBuffer *transformBuffer)
 Apply instancing setup to all mesh buffers in a mesh, binding instancing and transform buffers.
virtual bool applyInstancingForRenderLighting (IMesh *mesh, IVertexBuffer *instancingBuffer, IVertexBuffer *transformBuffer)
 Apply instancing setup for render lighting to all mesh buffers in a mesh.
virtual bool removeInstancing (IMesh *mesh)
 Remove instancing buffers from all mesh buffers in a mesh, restoring the base descriptor.
video::IVertexDescriptorgetBaseVertexDescriptor ()
 Get the base vertex descriptor used for original mesh format.
video::IVertexDescriptorgetInstancingVertexDescriptor ()
 Get the instancing vertex descriptor used for instanced rendering format.

Additional Inherited Members

Static Public Member Functions inherited from Skylicht::IShaderInstancing
static IVertexBuffer * createTransformVertexBuffer ()
 Create a vertex buffer for transform matrices (static method).
static IVertexBuffer * createIndirectLightingVertexBuffer ()
 Create a vertex buffer for indirect lighting data (static method).
static void batchTransformAndLighting (IVertexBuffer *tBuffer, IVertexBuffer *lBuffer, CEntity **entities, int count)
 Batch update transform and lighting vertex buffers for multiple entities (static method).
static void batchTransform (IVertexBuffer *tBuffer, CEntity **entities, int count)
 Batch update transform vertex buffer for multiple entities (static method).
Protected Attributes inherited from Skylicht::IShaderInstancing
video::IVertexDescriptorm_baseVtxDescriptor
 The base vertex descriptor(original mesh format).
video::IVertexDescriptorm_vtxDescriptor
 Vertex descriptor for instanced rendering.
video::IVertexDescriptorm_vtxDescriptorForRenderLighting
 Vertex descriptor for instanced rendering with lighting data.

Member Function Documentation

◆ batchIntancing()

virtual void Skylicht::CStandardColorInstancing::batchIntancing ( IVertexBuffer * vtxBuffer,
CMaterial ** materials,
CEntity ** entities,
int count )
virtual

Batch update instancing vertex buffer with transform and material data for multiple entities (must be implemented by subclasses).

Parameters
vtxBufferInstancing vertex buffer to fill.
materialsArray of materials per entity.
entitiesArray of entities.
countNumber of instances.

Implements Skylicht::IShaderInstancing.

◆ createInstancingVertexBuffer()

virtual IVertexBuffer * Skylicht::CStandardColorInstancing::createInstancingVertexBuffer ( )
virtual

Create a vertex buffer for instancing data (must be implemented by subclasses).

Returns
Pointer to newly created instancing vertex buffer.

Implements Skylicht::IShaderInstancing.

◆ createMeshBuffer()

virtual IMeshBuffer * Skylicht::CStandardColorInstancing::createMeshBuffer ( video::E_INDEX_TYPE type)
virtual

Create a mesh buffer for a specific index type (must be implemented by subclasses).

Parameters
typeIndex buffer type.
Returns
Pointer to newly created mesh buffer.

Implements Skylicht::IShaderInstancing.


The documentation for this class was generated from the following file: