1#include "InstancedMeshRenderComponent.h"
20 TypeDatabase::createType<InstancedMeshRenderComponent>().setBase<
RenderComponent>().setFields(fields);
25 if (startIndex >= meshCount) {
29 const uint32_t count = instanceCount != DrawRest ? instanceCount : meshCount - startIndex;
32 if (count > DrawRest - startIndex) {
37 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.
uint32_t instanceIdMultiplier
static uint32_t getRenderCount(uint32_t startIndex, uint32_t instanceCount, uint32_t meshCount)
Get number of instanced Meshes to render.
PrimitiveType primitiveType
Primitive type to use when drawing. Default value -1 means use primitive type from mesh.
MaterialInstanceHandle material
Material instance used to render the mesh.
uint32_t startInstance
Start instance.
Base component for all rendering content.
Field definition describing a single data member of a data structure.
Contains reflection support.