The IIndexBuffer video object interface. More...

#include "murl_video_i_index_buffer.h"

Inherited by Murl::Video::IndexBuffer.

Public Member Functions

virtual IObjectGetObjectInterface ()=0
 Get the mutable Video::IObject interface. More...
 
virtual const IObjectGetObjectInterface () const =0
 Get the constant Video::IObject interface. More...
 
virtual Bool Draw ()=0
 Draw geometry using this index buffer. More...
 
virtual Bool SetDynamicBatchingAllowed (Bool allowed)=0
 Allow/disallow dynamic batching. More...
 
virtual Bool IsDynamicBatchingAllowed () const =0
 Check if the buffer allows for dynamic batching. More...
 
virtual Bool SetAccessMode (IEnums::BufferAccessMode mode)=0
 Set the access mode hint (read only or read/write). More...
 
virtual IEnums::BufferAccessMode GetAccessMode () const =0
 Get the access mode hint. More...
 
virtual Bool SetPrimitiveType (IEnums::PrimitiveType type)=0
 Set the primitive type to render. More...
 
virtual IEnums::PrimitiveType GetPrimitiveType () const =0
 Get the primitive type. More...
 
virtual Bool SetIndexType (IEnums::IndexType type)=0
 Set the data type of the indices stored in the buffer. More...
 
virtual IEnums::IndexType GetIndexType () const =0
 Get the data type of the indices stored in the buffer. More...
 
virtual Bool SetIndexData (void *indices, UInt32 maxNumberOfIndices)=0
 Assign a mutable source data storage. More...
 
virtual Bool SetIndexData (const void *indices, UInt32 maxNumberOfIndices)=0
 Assign a constant source data storage. More...
 
virtual Bool SetNumberOfIndices (UInt32 numberOfIndices)=0
 Set the actual number of indices used. More...
 
virtual Bool SetIndicesModified ()=0
 Mark the whole buffer as modified. More...
 
virtual Bool SetIndicesModified (UInt32 firstIndex, UInt32 numberOfIndices)=0
 Mark a sub-region of the buffer as modified. More...
 
virtual void * GetIndexData ()=0
 Get a pointer to the mutable source data, if available. More...
 
virtual const void * GetIndexData () const =0
 Get a pointer to the constant source data. More...
 
virtual void * GetIndexBufferData ()=0
 Get a pointer to the actual mutable buffer data. More...
 
virtual const void * GetIndexBufferData () const =0
 Get a pointer to the actual constant buffer data. More...
 
virtual UInt32 GetMaxNumberOfIndices () const =0
 Get the maximum number of indices the buffer can hold. More...
 
virtual UInt32 GetNumberOfIndices () const =0
 Get the actual number of indices used. More...
 
virtual Bool AreIndicesModified () const =0
 Check if the buffer contents are modified. More...
 
virtual Bool SetSegmentData (UInt32 *segments)=0
 Assign a mutable data storage defining individual buffer segments. More...
 
virtual Bool SetSegmentData (const UInt32 *segments)=0
 Assign a constant data storage defining individual buffer segments. More...
 
virtual Bool SetNumberOfSegments (UInt32 numberOfSegments)=0
 Set the actual number of segments used. More...
 
virtual Bool SetSegmentsModified ()=0
 Mark the segments as modified. More...
 
virtual UInt32GetSegmentData ()=0
 Get a pointer to the mutable segment data, if available. More...
 
virtual const UInt32GetSegmentData () const =0
 Get a pointer to the constant segment data. More...
 
virtual UInt32 GetNumberOfSegments () const =0
 Get the actual number of segments used. More...
 
virtual Bool AreSegmentsModified () const =0
 Check if the segments are modified. More...
 
virtual Bool SetActiveSegmentData (UInt32 *segmentIndices)=0
 Assign a mutable data storage defining actually active buffer segments. More...
 
virtual Bool SetActiveSegmentData (const UInt32 *segmentIndices)=0
 Assign a constant data storage defining actually active buffer segments. More...
 
virtual Bool SetNumberOfActiveSegments (UInt32 numberOfSegmentIndices)=0
 Set the actual number of segment indices used. More...
 
virtual Bool SetActiveSegmentsModified ()=0
 Mark the active segments as modified. More...
 
virtual UInt32GetActiveSegmentData ()=0
 Get a pointer to the mutable active segment data, if available. More...
 
virtual const UInt32GetActiveSegmentData () const =0
 Get a pointer to the constant active segment data. More...
 
virtual UInt32 GetNumberOfActiveSegments () const =0
 Get the actual number of active segments used. More...
 
virtual Bool AreActiveSegmentsModified () const =0
 Check if the active segments are modified. More...
 
virtual Bool IsInVideoMemory () const =0
 Check if the actual buffer resides in video memory. More...
 
virtual Bool HasDataToDraw () const =0
 Check if the buffer is actually containing any indices. More...
 
virtual UInt32 GetSignature () const =0
 Get the signature, obtained via IRenderer::AcquireIndexBufferSignature(). More...
 

Detailed Description

The IIndexBuffer video object interface.

This interface represents a buffer containing indices of an indexed geometry.

Used internally by various geometry graph nodes, such as Graph::GenericGeometry, Graph::ResourceMeshGeometry and others.

Member Function Documentation

◆ GetObjectInterface() [1/2]

virtual IObject* Murl::Video::IIndexBuffer::GetObjectInterface ( )
pure virtual

Get the mutable Video::IObject interface.

Returns
The IObject interface.

◆ GetObjectInterface() [2/2]

virtual const IObject* Murl::Video::IIndexBuffer::GetObjectInterface ( ) const
pure virtual

Get the constant Video::IObject interface.

Returns
The IObject interface.

◆ Draw()

virtual Bool Murl::Video::IIndexBuffer::Draw ( )
pure virtual

Draw geometry using this index buffer.

Returns
true if successful.

◆ SetDynamicBatchingAllowed()

virtual Bool Murl::Video::IIndexBuffer::SetDynamicBatchingAllowed ( Bool  allowed)
pure virtual

Allow/disallow dynamic batching.

Parameters
allowedIf true, dynamic batching is allowed.
Returns
true if successful.

◆ IsDynamicBatchingAllowed()

virtual Bool Murl::Video::IIndexBuffer::IsDynamicBatchingAllowed ( ) const
pure virtual

Check if the buffer allows for dynamic batching.

Returns
true if dynamic batching is allowed.

◆ SetAccessMode()

virtual Bool Murl::Video::IIndexBuffer::SetAccessMode ( IEnums::BufferAccessMode  mode)
pure virtual

Set the access mode hint (read only or read/write).

Parameters
modeThe access mode.
Returns
true if successful.

◆ GetAccessMode()

virtual IEnums::BufferAccessMode Murl::Video::IIndexBuffer::GetAccessMode ( ) const
pure virtual

Get the access mode hint.

Returns
The access mode.

◆ SetPrimitiveType()

virtual Bool Murl::Video::IIndexBuffer::SetPrimitiveType ( IEnums::PrimitiveType  type)
pure virtual

Set the primitive type to render.

Parameters
typeThe primitive type.
Returns
true if successful.

◆ GetPrimitiveType()

virtual IEnums::PrimitiveType Murl::Video::IIndexBuffer::GetPrimitiveType ( ) const
pure virtual

Get the primitive type.

Returns
The primitive type.

◆ SetIndexType()

virtual Bool Murl::Video::IIndexBuffer::SetIndexType ( IEnums::IndexType  type)
pure virtual

Set the data type of the indices stored in the buffer.

Parameters
typeOne of the IEnums::IndexType members.
Returns
true if successful.

◆ GetIndexType()

virtual IEnums::IndexType Murl::Video::IIndexBuffer::GetIndexType ( ) const
pure virtual

Get the data type of the indices stored in the buffer.

Returns
One of the IEnums::IndexType members.

◆ SetIndexData() [1/2]

virtual Bool Murl::Video::IIndexBuffer::SetIndexData ( void *  indices,
UInt32  maxNumberOfIndices 
)
pure virtual

Assign a mutable source data storage.

Parameters
indicesA pointer to the mutable buffer holding the source indices.
maxNumberOfIndicesThe maximum number of indices the buffer can hold.
Returns
true if successful.

◆ SetIndexData() [2/2]

virtual Bool Murl::Video::IIndexBuffer::SetIndexData ( const void *  indices,
UInt32  maxNumberOfIndices 
)
pure virtual

Assign a constant source data storage.

Parameters
indicesA pointer to the constant buffer holding the source indices.
maxNumberOfIndicesThe maximum number of indices the buffer can hold.
Returns
true if successful.

◆ SetNumberOfIndices()

virtual Bool Murl::Video::IIndexBuffer::SetNumberOfIndices ( UInt32  numberOfIndices)
pure virtual

Set the actual number of indices used.

Parameters
numberOfIndicesThe actual number of indices. Must be less or equal than the maximum number defined via SetIndexData().
Returns
true if successful.

◆ SetIndicesModified() [1/2]

virtual Bool Murl::Video::IIndexBuffer::SetIndicesModified ( )
pure virtual

Mark the whole buffer as modified.

Returns
true if successful.

◆ SetIndicesModified() [2/2]

virtual Bool Murl::Video::IIndexBuffer::SetIndicesModified ( UInt32  firstIndex,
UInt32  numberOfIndices 
)
pure virtual

Mark a sub-region of the buffer as modified.

Parameters
firstIndexThe first modified index in the buffer.
numberOfIndicesThe number of modified indices.
Returns
true if successful.

◆ GetIndexData() [1/2]

virtual void* Murl::Video::IIndexBuffer::GetIndexData ( )
pure virtual

Get a pointer to the mutable source data, if available.

If the source data storage was defined using a constant pointer, this method returns null.

Returns
A pointer to the mutable source data, or null if the source is immutable.

◆ GetIndexData() [2/2]

virtual const void* Murl::Video::IIndexBuffer::GetIndexData ( ) const
pure virtual

Get a pointer to the constant source data.

Returns
A pointer to the source data.

◆ GetIndexBufferData() [1/2]

virtual void* Murl::Video::IIndexBuffer::GetIndexBufferData ( )
pure virtual

Get a pointer to the actual mutable buffer data.

Returns
A pointer to the actual buffer data.

◆ GetIndexBufferData() [2/2]

virtual const void* Murl::Video::IIndexBuffer::GetIndexBufferData ( ) const
pure virtual

Get a pointer to the actual constant buffer data.

Returns
A pointer to the actual buffer data.

◆ GetMaxNumberOfIndices()

virtual UInt32 Murl::Video::IIndexBuffer::GetMaxNumberOfIndices ( ) const
pure virtual

Get the maximum number of indices the buffer can hold.

Returns
The maximum number of indices.

◆ GetNumberOfIndices()

virtual UInt32 Murl::Video::IIndexBuffer::GetNumberOfIndices ( ) const
pure virtual

Get the actual number of indices used.

Returns
The actual number of indices.

◆ AreIndicesModified()

virtual Bool Murl::Video::IIndexBuffer::AreIndicesModified ( ) const
pure virtual

Check if the buffer contents are modified.

Returns
true if modified.

◆ SetSegmentData() [1/2]

virtual Bool Murl::Video::IIndexBuffer::SetSegmentData ( UInt32 segments)
pure virtual

Assign a mutable data storage defining individual buffer segments.

The given segment data must be an array of 2*N UInt32 values defining N individual index buffer segments. The first UInt32 value of each segment (2*i) defines the number of indices belonging to that segment, and the second (2*i+1) value defines the start index into the source indices set via SetIndexData(). If segments are defined, an intermediate buffer is created that receives a consecutive list of all indices over all segments. If not defined, the whole index buffer is rendered "as-is".

Parameters
segmentsAn array of segments.
Returns
true if successful.

◆ SetSegmentData() [2/2]

virtual Bool Murl::Video::IIndexBuffer::SetSegmentData ( const UInt32 segments)
pure virtual

Assign a constant data storage defining individual buffer segments.

See SetSegmentData(UInt32*).

Parameters
segmentsAn array of segments.
Returns
true if successful.

◆ SetNumberOfSegments()

virtual Bool Murl::Video::IIndexBuffer::SetNumberOfSegments ( UInt32  numberOfSegments)
pure virtual

Set the actual number of segments used.

Parameters
numberOfSegmentsThe actual number of segments. 2*numberOfSegments must be less or equal than the number of array entries for the segments set via SetSegmentData().
Returns
true if successful.

◆ SetSegmentsModified()

virtual Bool Murl::Video::IIndexBuffer::SetSegmentsModified ( )
pure virtual

Mark the segments as modified.

Returns
true if successful.

◆ GetSegmentData() [1/2]

virtual UInt32* Murl::Video::IIndexBuffer::GetSegmentData ( )
pure virtual

Get a pointer to the mutable segment data, if available.

If the segment data storage was defined using a constant pointer, this method returns null.

Returns
A pointer to the mutable segment data, or null if the segments are immutable.

◆ GetSegmentData() [2/2]

virtual const UInt32* Murl::Video::IIndexBuffer::GetSegmentData ( ) const
pure virtual

Get a pointer to the constant segment data.

Returns
A pointer to the segment data.

◆ GetNumberOfSegments()

virtual UInt32 Murl::Video::IIndexBuffer::GetNumberOfSegments ( ) const
pure virtual

Get the actual number of segments used.

Returns
The actual number of segments.

◆ AreSegmentsModified()

virtual Bool Murl::Video::IIndexBuffer::AreSegmentsModified ( ) const
pure virtual

Check if the segments are modified.

Returns
true if modified.

◆ SetActiveSegmentData() [1/2]

virtual Bool Murl::Video::IIndexBuffer::SetActiveSegmentData ( UInt32 segmentIndices)
pure virtual

Assign a mutable data storage defining actually active buffer segments.

The given data is an array of K UInt32 indices into the segment array defined via SetSegmentData(). Each entry specifies a single active segment from that array, which in turn references a sub-region of the source index data. If present, the intermediate buffer described in SetSegmentData() is not filled with all present segments; instead, only those segments are considered that are in the array given at this method.

Parameters
segmentIndicesAn array of active segment indices.
Returns
true if successful.

◆ SetActiveSegmentData() [2/2]

virtual Bool Murl::Video::IIndexBuffer::SetActiveSegmentData ( const UInt32 segmentIndices)
pure virtual

Assign a constant data storage defining actually active buffer segments.

See SetActiveSegmentData(UInt32*).

Parameters
segmentIndicesAn array of active segment indices.
Returns
true if successful.

◆ SetNumberOfActiveSegments()

virtual Bool Murl::Video::IIndexBuffer::SetNumberOfActiveSegments ( UInt32  numberOfSegmentIndices)
pure virtual

Set the actual number of segment indices used.

Parameters
numberOfSegmentIndicesThe actual number of segment indices. This must be less or equal than the number of entries in the array defined via SetActiveSegmentData().
Returns
true if successful.

◆ SetActiveSegmentsModified()

virtual Bool Murl::Video::IIndexBuffer::SetActiveSegmentsModified ( )
pure virtual

Mark the active segments as modified.

Returns
true if successful.

◆ GetActiveSegmentData() [1/2]

virtual UInt32* Murl::Video::IIndexBuffer::GetActiveSegmentData ( )
pure virtual

Get a pointer to the mutable active segment data, if available.

If the active segment data storage was defined using a constant pointer, this method returns null.

Returns
A pointer to the mutable active segment data, or null if the active segments are immutable.

◆ GetActiveSegmentData() [2/2]

virtual const UInt32* Murl::Video::IIndexBuffer::GetActiveSegmentData ( ) const
pure virtual

Get a pointer to the constant active segment data.

Returns
A pointer to the active segment data.

◆ GetNumberOfActiveSegments()

virtual UInt32 Murl::Video::IIndexBuffer::GetNumberOfActiveSegments ( ) const
pure virtual

Get the actual number of active segments used.

Returns
The actual number of active segments.

◆ AreActiveSegmentsModified()

virtual Bool Murl::Video::IIndexBuffer::AreActiveSegmentsModified ( ) const
pure virtual

Check if the active segments are modified.

Returns
true if modified.

◆ IsInVideoMemory()

virtual Bool Murl::Video::IIndexBuffer::IsInVideoMemory ( ) const
pure virtual

Check if the actual buffer resides in video memory.

Returns
true if in video memory.

◆ HasDataToDraw()

virtual Bool Murl::Video::IIndexBuffer::HasDataToDraw ( ) const
pure virtual

Check if the buffer is actually containing any indices.

Returns
true if the buffer has data to draw.

◆ GetSignature()

virtual UInt32 Murl::Video::IIndexBuffer::GetSignature ( ) const
pure virtual

Get the signature, obtained via IRenderer::AcquireIndexBufferSignature().

Returns
The buffer signature.

The documentation for this interface was generated from the following file:
  • murl_video_i_index_buffer.h


Copyright © 2011-2018 Spraylight GmbH.