1#include "InstancedMeshRenderComponent.h"
19 TypeDatabase::createType<InstancedMeshRenderComponent>().setBase<
RenderComponent>().setFields(fields);
24 if (startIndex >= meshCount) {
28 const uint32_t count = instanceCount != DrawRest ? instanceCount : meshCount - startIndex;
31 if (count > DrawRest - startIndex) {
36 return (startIndex + count > meshCount) ? (meshCount - startIndex) : count;
uint32_t startIndex
Start vertex index to render from.
uint32_t vertexCount
Number of vertexes to draw. uint32_t(-1) to draw all remaining vertices.
uint32_t instanceCount
Instance count. uint32_t(-1) to draw all remaining instances.
static void registerType()
Register the type in the type system.
static uint32_t getRenderCount(uint32_t startIndex, uint32_t instanceCount, uint32_t meshCount)
Get number of instanced Meshes to render.
MaterialInstanceHandle material
Material instance used to render the mesh.
uint32_t startInstance
Start instance.
PrimitiveType::EPrimitiveType primitiveType
Primitive type to use when drawing. Default value -1 means use primitive type from mesh.
MeshHandle instanceMesh
Mesh containing instancing data.
Base component for all rendering content.
Field definition describing a single data member of a data structure.
Contains reflection support.