My Project
Public Member Functions | Public Attributes | List of all members
ParaEngine::RenderableChunk::InstanceGroup Struct Reference

Public Member Functions

void reset ()
 
bool isEmpty () const
 
void AddFace (uint32_t nCount)
 
void AddInstance (uint16_t nIndex, uint32_t nFaceCount=0)
 
uint32_t GetFaceCount () const
 
void operator+= (InstanceGroup &right)
 
bool CanShareRenderBufferWith (InstanceGroup *pOther=NULL)
 whether this instance group can share vertex buffer with the other instance, providing that both instance are from the same chunk. More...
 

Public Attributes

BlockTemplatem_pTemplate
 
uint32_t m_blockData
 
uint32_t m_nFaceCount
 
std::vector< uint16_t > instances
 

Member Function Documentation

§ CanShareRenderBufferWith()

bool ParaEngine::RenderableChunk::InstanceGroup::CanShareRenderBufferWith ( InstanceGroup pOther = NULL)

whether this instance group can share vertex buffer with the other instance, providing that both instance are from the same chunk.

this allows us to batch different blocks sharing same texture(altas) into one draw call.

Parameters
pOtherif NULL, it always return false;

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