Rebel Fork Framework
Urho3D::IndexBuffer Class Reference

Hardware index buffer. More...

#include <Urho3D/Graphics/IndexBuffer.h>

Inheritance diagram for Urho3D::IndexBuffer:
Urho3D::PipelineStateTracker

Public Member Functions

 IndexBuffer (Context *context)
 
void SetShadowed (bool enable)
 
bool SetSize (unsigned indexCount, bool largeIndices, bool dynamic=false)
 Set size and vertex elements and dynamic mode. Previous data will be lost.
 
bool IsDynamic () const
 
unsigned GetIndexCount () const
 
unsigned GetIndexSize () const
 
bool GetUsedVertexRange (unsigned start, unsigned count, unsigned &minVertex, unsigned &vertexCount)
 Return used vertex range from index range.
 
ea::vector< unsigned > GetUnpackedData (unsigned start=0, unsigned count=M_MAX_UNSIGNED) const
 Return unpacked buffer data as plain array of indices.
 
void SetUnpackedData (const unsigned data[], unsigned start=0, unsigned count=M_MAX_UNSIGNED)
 Set data in the buffer from unpacked data. Data should contain at least count elements.
 
- Public Member Functions inherited from Urho3D::PipelineStateTracker
virtual ~PipelineStateTracker ()
 Destruct.
 
unsigned GetPipelineStateHash () const
 Return (partial) pipeline state hash. Save to call from multiple threads as long as the object is not changing.
 
void MarkPipelineStateHashDirty ()
 Mark pipeline state hash as dirty.
 

Static Public Member Functions

static void UnpackIndexData (const void *source, bool largeIndices, unsigned start, unsigned count, unsigned dest[])
 Unpack index data from index buffer into unsigned int array.
 
static void PackIndexData (const unsigned source[], void *dest, bool largeIndices, unsigned start, unsigned count)
 Pack index data from unsigned int array into index buffer.
 
static IndexBufferType GetIndexBufferType (IndexBuffer *indexBuffer)
 Return type of index buffer. Null is allowed.
 

Private Member Functions

 URHO3D_OBJECT (IndexBuffer, RawBuffer)
 
unsigned RecalculatePipelineStateHash () const override
 Recalculate hash (must not be non zero). Shall be save to call from multiple threads as long as the object is not changing.
 

Private Attributes

unsigned indexCount_ {}
 Number of indices.
 
unsigned indexSize_ {}
 Index size.
 
bool shadowedPending_ {}
 Shadowed flag.
 

Additional Inherited Members

- Protected Member Functions inherited from Urho3D::PipelineStateTracker
PipelineStateSubscription CreateDependency (PipelineStateTracker *dependency)
 Create dependency onto another pipeline state.
 
void AddSubscriberReference (PipelineStateTracker *subscriber)
 Add reference to subscriber pipeline state tracker.
 
void RemoveSubscriberReference (PipelineStateTracker *subscriber)
 Remove reference to subscriber pipeline state tracker.
 

Detailed Description

Hardware index buffer.

Member Function Documentation

◆ GetIndexCount()

unsigned Urho3D::IndexBuffer::GetIndexCount ( ) const
inline

Return number of indices.

◆ GetIndexSize()

unsigned Urho3D::IndexBuffer::GetIndexSize ( ) const
inline

Return index size in bytes.

◆ IsDynamic()

bool Urho3D::IndexBuffer::IsDynamic ( ) const
inline

Return whether is dynamic.

◆ SetShadowed()

void Urho3D::IndexBuffer::SetShadowed ( bool  enable)

Enable shadowing in CPU memory. Shadowing is forced on if the graphics subsystem does not exist.


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