![]() |
XII Release 0.1.0
|
Base class for all render data. Render data must contain all information that is needed to render the corresponding object. More...
#include <RenderData.h>
Classes | |
struct | Caching |
struct | Category |
Public Types | |
using | SortingKeyFunc = xiiUInt64 (*)(const xiiRenderData*, const xiiCamera&) |
This function generates a 64bit sorting key for the given render data. Data with lower sorting key is rendered first. | |
Public Member Functions | |
xiiUInt64 | GetFinalSortingKey (Category category, const xiiCamera &camera) const |
Returns the final sorting for this render data with the given category and camera. | |
virtual bool | CanBatch (const xiiRenderData &other) const |
Returns whether this render data and the other render data can be batched together, e.g. rendered in one draw call. An implementation can assume that the other render data is of the same type as this render data. | |
![]() | |
virtual const xiiRTTI * | GetDynamicRTTI () const |
bool | IsInstanceOf (const xiiRTTI *pType) const |
Returns whether the type of this instance is of the given type or derived from it. | |
template<typename T> | |
XII_ALWAYS_INLINE bool | IsInstanceOf () const |
Returns whether the type of this instance is of the given type or derived from it. | |
Static Public Member Functions | |
static Category | RegisterCategory (xiiStringView sCategoryName, SortingKeyFunc sortingKeyFunc) |
static Category | FindCategory (xiiTempHashedString sCategoryName) |
static xiiHashedString | GetCategoryName (Category category) |
static void | GetAllCategoryNames (xiiDynamicArray< xiiHashedString > &out_categoryNames) |
static const xiiRenderer * | GetCategoryRenderer (Category category, const xiiRTTI *pRenderDataType) |
![]() | |
static const xiiRTTI * | GetStaticRTTI () |
Public Attributes | |
xiiTransform | m_GlobalTransform = xiiTransform::MakeIdentity() |
xiiBoundingBoxSphere | m_GlobalBounds |
xiiUInt32 | m_uiSortingKey = 0 |
float | m_fSortingDepthOffset = 0.0f |
xiiGameObjectHandle | m_hOwner |
Base class for all render data. Render data must contain all information that is needed to render the corresponding object.
|
inlinevirtual |
Returns whether this render data and the other render data can be batched together, e.g. rendered in one draw call. An implementation can assume that the other render data is of the same type as this render data.
Reimplemented in xiiCustomMeshRenderData, xiiInstancedMeshRenderData, xiiLensFlareRenderData, xiiMeshRenderData, xiiSkinnedMeshRenderData, and xiiSpriteRenderData.