3#include "Components/Core/RenderComponent.h"
5#include "Rendering/Common.h"
7#include "Resources/Resources.h"
43 static constexpr uint32_t
DrawRest =
static_cast<uint32_t
>(-1);
61template<>
inline Cogs::StringView getName<Cogs::Core::InstancedMeshRenderComponent>() {
return "InstancedMeshRenderComponent"; }
Renders a mesh using instancing.
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.
static constexpr uint32_t DrawRest
Special value for vertex/instance Count to draw all elements from start index.
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.
Provides a weakly referenced view over the contents of a string.
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
EPrimitiveType
Primitive type enumeration.