Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
dcpp::scene::PIndexBuffer Class Reference
Inheritance diagram for dcpp::scene::PIndexBuffer:
Inheritance graph
Collaboration diagram for dcpp::scene::PIndexBuffer:
Collaboration graph

Public Member Functions

 PIndexBuffer (dcpp::video::E_INDEX_TYPE IndexType)
 
 PIndexBuffer (const IIndexBuffer &IndexBufferCopy)
 
virtual void setType (dcpp::video::E_INDEX_TYPE indexType) override
 Change between 16 and 32 bit indices.
 
virtual void * getData () override
 Pointer to first element.
 
virtual const void * getData () const override
 Const pointer to first element.
 
virtual dcpp::video::E_INDEX_TYPE getType () const override
 
virtual dcpp::uint32_kt stride () const override
 Number of bytes per element.
 
virtual dcpp::uint32_kt size () const override
 Number of elements.
 
virtual void push_back (dcpp::uint32_kt value) override
 Add value to end. Note that for 16 bit index types values shouldn't be larger than dcpp::uint16_kt.
 
virtual dcpp::uint32_kt operator[] (dcpp::uint32_kt index) const override
 Access element value at given index.
 
virtual dcpp::uint32_kt getLast () override
 
virtual void setValue (dcpp::uint32_kt index, dcpp::uint32_kt value) override
 Set value at index. Note that for 16 bit index types values shouldn't be larger than dcpp::uint16_kt.
 
virtual void set_used (dcpp::uint32_kt usedNow) override
 
virtual void reallocate (dcpp::uint32_kt new_size, bool canShrink=true) override
 
virtual dcpp::uint32_kt allocated_size () const override
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint () const override
 get the current hardware mapping hint
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint) override
 set the hardware mapping hint, for driver
 
virtual void setDirty () override
 flags the mesh as changed, reloads hardware buffers
 
virtual dcpp::uint32_kt getChangedID () const override
 Get the currently used ID for identification of changes.
 
- Public Member Functions inherited from dcpp::scene::IIndexBuffer
void * pointer ()
 Same as getData(), just closer to dcpp::nub::array interface.
 
- Public Member Functions inherited from dcpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
dcpp::int32_kt getReferenceCount () const
 Get the reference count.
 
const dcpp::char_ktgetDebugName () const
 Returns the debug name of the object.
 

Public Attributes

IIndexList * Indices
 
E_HARDWARE_MAPPING MappingHint
 
dcpp::uint32_kt ChangedID
 

Additional Inherited Members

- Protected Member Functions inherited from dcpp::IReferenceCounted
void setDebugName (const dcpp::char_kt *newName)
 Sets the debug name of the object.
 

Member Function Documentation

◆ allocated_size()

virtual dcpp::uint32_kt dcpp::scene::PIndexBuffer::allocated_size ( ) const
inlineoverridevirtual

◆ getChangedID()

virtual dcpp::uint32_kt dcpp::scene::PIndexBuffer::getChangedID ( ) const
inlineoverridevirtual

Get the currently used ID for identification of changes.

This shouldn't be used for anything outside the VideoDriver.

Implements dcpp::scene::IIndexBuffer.

◆ getData() [1/2]

virtual const void * dcpp::scene::PIndexBuffer::getData ( ) const
inlineoverridevirtual

Const pointer to first element.

Implements dcpp::scene::IIndexBuffer.

◆ getData() [2/2]

virtual void * dcpp::scene::PIndexBuffer::getData ( )
inlineoverridevirtual

Pointer to first element.

Implements dcpp::scene::IIndexBuffer.

◆ getHardwareMappingHint()

virtual E_HARDWARE_MAPPING dcpp::scene::PIndexBuffer::getHardwareMappingHint ( ) const
inlineoverridevirtual

get the current hardware mapping hint

Implements dcpp::scene::IIndexBuffer.

◆ getLast()

virtual dcpp::uint32_kt dcpp::scene::PIndexBuffer::getLast ( )
inlineoverridevirtual

◆ getType()

virtual dcpp::video::E_INDEX_TYPE dcpp::scene::PIndexBuffer::getType ( ) const
inlineoverridevirtual

◆ operator[]()

virtual dcpp::uint32_kt dcpp::scene::PIndexBuffer::operator[] ( dcpp::uint32_kt  index) const
inlineoverridevirtual

Access element value at given index.

Implements dcpp::scene::IIndexBuffer.

◆ push_back()

virtual void dcpp::scene::PIndexBuffer::push_back ( dcpp::uint32_kt  value)
inlineoverridevirtual

Add value to end. Note that for 16 bit index types values shouldn't be larger than dcpp::uint16_kt.

Implements dcpp::scene::IIndexBuffer.

◆ reallocate()

virtual void dcpp::scene::PIndexBuffer::reallocate ( dcpp::uint32_kt  new_size,
bool  canShrink = true 
)
inlineoverridevirtual

◆ set_used()

virtual void dcpp::scene::PIndexBuffer::set_used ( dcpp::uint32_kt  usedNow)
inlineoverridevirtual

◆ setDirty()

virtual void dcpp::scene::PIndexBuffer::setDirty ( )
inlineoverridevirtual

flags the mesh as changed, reloads hardware buffers

Implements dcpp::scene::IIndexBuffer.

◆ setHardwareMappingHint()

virtual void dcpp::scene::PIndexBuffer::setHardwareMappingHint ( E_HARDWARE_MAPPING  NewMappingHint)
inlineoverridevirtual

set the hardware mapping hint, for driver

Implements dcpp::scene::IIndexBuffer.

◆ setType()

virtual void dcpp::scene::PIndexBuffer::setType ( dcpp::video::E_INDEX_TYPE  IndexType)
inlineoverridevirtual

Change between 16 and 32 bit indices.

This copies all indices to a new buffer of corresponding type. Be careful - going from 32 to 16 bit will only work correctly if none of your indices is larger than 16 bit.

Implements dcpp::scene::IIndexBuffer.

◆ setValue()

virtual void dcpp::scene::PIndexBuffer::setValue ( dcpp::uint32_kt  index,
dcpp::uint32_kt  value 
)
inlineoverridevirtual

Set value at index. Note that for 16 bit index types values shouldn't be larger than dcpp::uint16_kt.

Buffer must be already large enough. This is basically the non const version of operator []

Implements dcpp::scene::IIndexBuffer.

◆ size()

virtual dcpp::uint32_kt dcpp::scene::PIndexBuffer::size ( ) const
inlineoverridevirtual

Number of elements.

Implements dcpp::scene::IIndexBuffer.

◆ stride()

virtual dcpp::uint32_kt dcpp::scene::PIndexBuffer::stride ( ) const
inlineoverridevirtual

Number of bytes per element.

Implements dcpp::scene::IIndexBuffer.


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

Duckcpp    @cppfx.xyz