Cogs.Core
Public Types | Public Member Functions | Public Attributes | List of all members
Cogs::Core::RenderItem Struct Reference

Public Types

typedef void CustomCallback(RenderTaskContext *, DrawContext *, const RenderItem *)
 
typedef void CustomCallback2(RenderTaskContext *, DrawContext *, struct RenderListTask *task, const RenderItem *)
 

Public Member Functions

bool isCustom () const
 
bool isCustom1 () const
 
bool isCustom2 () const
 
bool isSprite () const
 
bool isClockwise () const
 
bool isTransparent () const
 
bool isCustomBucket () const
 
bool isBackdrop () const
 
bool needsDepthCalculation () const
 
bool hasBoundingBox () const
 
bool isCulled () const
 
bool isInstanced () const
 
bool hasObjectBufferSlot () const
 
void setBounds (const Geometry::BoundingBox *bounds)
 
template<typename T >
void setCallbackData (T *t) const
 
template<typename T >
void setCallbackData2 (T *t) const
 
template<typename T >
T * getCallbackData () const
 
template<typename T >
T * getCallbackData2 () const
 
size_t hash (size_t hashValue=Cogs::hash()) const
 

Public Attributes

const struct RenderMaterialInstancerenderMaterialInstance = nullptr
 
const MaterialInstancematerialInstance = nullptr
 
const struct EffectBindingbinding = nullptr
 
const struct CameraDataviewportData = nullptr
 
const struct PoseDataposeData = nullptr
 
union {
   uint32_t   cullingIndex
 
   const Geometry::BoundingBox *   boundingBox = nullptr
 
}; 
 
VertexArrayObjectHandle vertexArrayObject = VertexArrayObjectHandle::NoHandle
 
union {
   struct {
      const glm::mat4 *   worldMatrix
 
      const RenderMesh *   meshData
 
      uint32_t   startIndex
 
      uint32_t   numIndexes
 
      const RenderMesh *   instanceData
 
      uint32_t   startInstance
 
      uint32_t   numInstances
 
      Cogs::PrimitiveType::EPrimitiveType   primitiveType
 
   } 
 
   struct {
      const MeshStreamsLayout *   streamsLayout
 
      union {
         CustomCallback *   callback
 
         CustomCallback2 *   callback2
 
      } 
 
      void *   callbackData
 
      void *   callbackData2
 
   } 
 
}; 
 
RenderComponent::LodData lod
 
RenderLayers layer = RenderLayers::None
 Visibility mask.
 
float depth = 0.f
 Used for depth-sorting of transparent objects.
 
int32_t drawOrder = 0
 Ordering of draw items within a bucket.
 
union {
   uint32_t   objectId = 0
 Lower 6 of upper 8 bits are instance id bits, lower 24 bits are object id. More...
 
   uint32_t   objectBufferSlot
 Set if ObjectBufferSlot is set (then transform and objectId is in the object buffer). More...
 
}; 
 
RenderItemFlags flags = RenderItemFlags::None
 
StateChangeFlags stateChanges = StateChangeFlags::ChangeAll
 Encodes what state changed from previous item, updated by FilterListTask.
 
uint16_t blendState = 0
 
uint16_t depthState = 0
 
uint16_t rasterizerState = 0
 
uint8_t clipShapeIx = 0
 

Detailed Description

Definition at line 83 of file RenderList.h.

Member Typedef Documentation

◆ CustomCallback

typedef void Cogs::Core::RenderItem::CustomCallback(RenderTaskContext *, DrawContext *, const RenderItem *)

Definition at line 85 of file RenderList.h.

◆ CustomCallback2

typedef void Cogs::Core::RenderItem::CustomCallback2(RenderTaskContext *, DrawContext *, struct RenderListTask *task, const RenderItem *)

Definition at line 86 of file RenderList.h.

Member Function Documentation

◆ getCallbackData()

template<typename T >
T * Cogs::Core::RenderItem::getCallbackData ( ) const
inline

Definition at line 116 of file RenderList.h.

◆ getCallbackData2()

template<typename T >
T * Cogs::Core::RenderItem::getCallbackData2 ( ) const
inline

Definition at line 119 of file RenderList.h.

◆ hasBoundingBox()

bool Cogs::Core::RenderItem::hasBoundingBox ( ) const
inline

Definition at line 98 of file RenderList.h.

◆ hash()

size_t Cogs::Core::RenderItem::hash ( size_t  hashValue = Cogs::hash()) const
inline

Definition at line 189 of file RenderList.h.

◆ hasObjectBufferSlot()

bool Cogs::Core::RenderItem::hasObjectBufferSlot ( ) const
inline

Definition at line 101 of file RenderList.h.

◆ isBackdrop()

bool Cogs::Core::RenderItem::isBackdrop ( ) const
inline

Definition at line 96 of file RenderList.h.

◆ isClockwise()

bool Cogs::Core::RenderItem::isClockwise ( ) const
inline

Definition at line 93 of file RenderList.h.

◆ isCulled()

bool Cogs::Core::RenderItem::isCulled ( ) const
inline

Definition at line 99 of file RenderList.h.

◆ isCustom()

bool Cogs::Core::RenderItem::isCustom ( ) const
inline

Definition at line 89 of file RenderList.h.

◆ isCustom1()

bool Cogs::Core::RenderItem::isCustom1 ( ) const
inline

Definition at line 90 of file RenderList.h.

◆ isCustom2()

bool Cogs::Core::RenderItem::isCustom2 ( ) const
inline

Definition at line 91 of file RenderList.h.

◆ isCustomBucket()

bool Cogs::Core::RenderItem::isCustomBucket ( ) const
inline

Definition at line 95 of file RenderList.h.

◆ isInstanced()

bool Cogs::Core::RenderItem::isInstanced ( ) const
inline

Definition at line 100 of file RenderList.h.

◆ isSprite()

bool Cogs::Core::RenderItem::isSprite ( ) const
inline

Definition at line 92 of file RenderList.h.

◆ isTransparent()

bool Cogs::Core::RenderItem::isTransparent ( ) const
inline

Definition at line 94 of file RenderList.h.

◆ needsDepthCalculation()

bool Cogs::Core::RenderItem::needsDepthCalculation ( ) const
inline

Definition at line 97 of file RenderList.h.

◆ setBounds()

void Cogs::Core::RenderItem::setBounds ( const Geometry::BoundingBox *  bounds)
inline

Definition at line 103 of file RenderList.h.

◆ setCallbackData()

template<typename T >
void Cogs::Core::RenderItem::setCallbackData ( T *  t) const
inline

Definition at line 110 of file RenderList.h.

◆ setCallbackData2()

template<typename T >
void Cogs::Core::RenderItem::setCallbackData2 ( T *  t) const
inline

Definition at line 113 of file RenderList.h.

Member Data Documentation

◆ binding

const struct EffectBinding* Cogs::Core::RenderItem::binding = nullptr

Definition at line 126 of file RenderList.h.

◆ blendState

uint16_t Cogs::Core::RenderItem::blendState = 0

Definition at line 184 of file RenderList.h.

◆ boundingBox

const Geometry::BoundingBox* Cogs::Core::RenderItem::boundingBox = nullptr

Definition at line 132 of file RenderList.h.

◆ callback

CustomCallback* Cogs::Core::RenderItem::callback

Definition at line 161 of file RenderList.h.

◆ callback2

CustomCallback2* Cogs::Core::RenderItem::callback2

Definition at line 162 of file RenderList.h.

◆ callbackData

void* Cogs::Core::RenderItem::callbackData
mutable

Definition at line 164 of file RenderList.h.

◆ callbackData2

void* Cogs::Core::RenderItem::callbackData2
mutable

Definition at line 165 of file RenderList.h.

◆ clipShapeIx

uint8_t Cogs::Core::RenderItem::clipShapeIx = 0

Definition at line 187 of file RenderList.h.

◆ cullingIndex

uint32_t Cogs::Core::RenderItem::cullingIndex

Definition at line 131 of file RenderList.h.

◆ depth

float Cogs::Core::RenderItem::depth = 0.f

Used for depth-sorting of transparent objects.

Definition at line 171 of file RenderList.h.

◆ depthState

uint16_t Cogs::Core::RenderItem::depthState = 0

Definition at line 185 of file RenderList.h.

◆ drawOrder

int32_t Cogs::Core::RenderItem::drawOrder = 0

Ordering of draw items within a bucket.

Definition at line 172 of file RenderList.h.

◆ flags

RenderItemFlags Cogs::Core::RenderItem::flags = RenderItemFlags::None

Definition at line 177 of file RenderList.h.

◆ instanceData

const RenderMesh* Cogs::Core::RenderItem::instanceData

Definition at line 148 of file RenderList.h.

◆ layer

RenderLayers Cogs::Core::RenderItem::layer = RenderLayers::None

Visibility mask.

Definition at line 170 of file RenderList.h.

◆ lod

RenderComponent::LodData Cogs::Core::RenderItem::lod

Definition at line 169 of file RenderList.h.

◆ materialInstance

const MaterialInstance* Cogs::Core::RenderItem::materialInstance = nullptr

Definition at line 124 of file RenderList.h.

◆ meshData

const RenderMesh* Cogs::Core::RenderItem::meshData

Definition at line 144 of file RenderList.h.

◆ numIndexes

uint32_t Cogs::Core::RenderItem::numIndexes

Definition at line 146 of file RenderList.h.

◆ numInstances

uint32_t Cogs::Core::RenderItem::numInstances

Definition at line 150 of file RenderList.h.

◆ objectBufferSlot

uint32_t Cogs::Core::RenderItem::objectBufferSlot

Set if ObjectBufferSlot is set (then transform and objectId is in the object buffer).

Definition at line 175 of file RenderList.h.

◆ objectId

uint32_t Cogs::Core::RenderItem::objectId = 0

Lower 6 of upper 8 bits are instance id bits, lower 24 bits are object id.

Definition at line 174 of file RenderList.h.

◆ poseData

const struct PoseData* Cogs::Core::RenderItem::poseData = nullptr

Definition at line 128 of file RenderList.h.

◆ primitiveType

Cogs::PrimitiveType::EPrimitiveType Cogs::Core::RenderItem::primitiveType

Definition at line 152 of file RenderList.h.

◆ rasterizerState

uint16_t Cogs::Core::RenderItem::rasterizerState = 0

Definition at line 186 of file RenderList.h.

◆ renderMaterialInstance

const struct RenderMaterialInstance* Cogs::Core::RenderItem::renderMaterialInstance = nullptr

Definition at line 123 of file RenderList.h.

◆ startIndex

uint32_t Cogs::Core::RenderItem::startIndex

Definition at line 145 of file RenderList.h.

◆ startInstance

uint32_t Cogs::Core::RenderItem::startInstance

Definition at line 149 of file RenderList.h.

◆ stateChanges

StateChangeFlags Cogs::Core::RenderItem::stateChanges = StateChangeFlags::ChangeAll

Encodes what state changed from previous item, updated by FilterListTask.

Definition at line 178 of file RenderList.h.

◆ streamsLayout

const MeshStreamsLayout* Cogs::Core::RenderItem::streamsLayout

Definition at line 158 of file RenderList.h.

◆ vertexArrayObject

VertexArrayObjectHandle Cogs::Core::RenderItem::vertexArrayObject = VertexArrayObjectHandle::NoHandle

Definition at line 135 of file RenderList.h.

◆ viewportData

const struct CameraData* Cogs::Core::RenderItem::viewportData = nullptr

Definition at line 127 of file RenderList.h.

◆ worldMatrix

const glm::mat4* Cogs::Core::RenderItem::worldMatrix

Definition at line 142 of file RenderList.h.


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