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

Public Member Functions

virtual void * getData ()=0
 Pointer to first element of vertex data.
 
virtual const void * getData () const =0
 Const pointer to first element.
 
virtual void * pointer ()
 Same as getData.
 
virtual dcpp::video::E_VERTEX_TYPE getType () const =0
 
virtual void setType (dcpp::video::E_VERTEX_TYPE vertexType)=0
 
virtual dcpp::uint32_kt stride () const =0
 Number of bytes per element.
 
virtual dcpp::uint32_kt size () const =0
 Number of elements.
 
virtual void push_back (const dcpp::video::S3DVertex &element)=0
 Add vertex to end.
 
virtual void push_back (const dcpp::video::S3DVertex2TCoords &element)=0
 
virtual void push_back (const dcpp::video::S3DVertexTangents &element)=0
 
virtual void setValue (dcpp::uint32_kt index, const dcpp::video::S3DVertex &value)=0
 Set value at index. Buffer must be already large enough that element exists.
 
virtual void setValue (dcpp::uint32_kt index, const dcpp::video::S3DVertex2TCoords &value)=0
 
virtual void setValue (dcpp::uint32_kt index, const dcpp::video::S3DVertexTangents &value)=0
 
virtual dcpp::video::S3DVertexoperator[] (dcpp::uint32_kt index)=0
 Direct access to elements. Risky to use!
 
virtual dcpp::video::S3DVertexoperator[] (const dcpp::uint32_kt index) const =0
 
virtual dcpp::video::S3DVertexgetLast ()=0
 
virtual void set_used (dcpp::uint32_kt usedNow)=0
 
virtual void reallocate (dcpp::uint32_kt new_size, bool canShrink=true)=0
 
virtual dcpp::uint32_kt allocated_size () const =0
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint () const =0
 get the current hardware mapping hint
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint)=0
 set the hardware mapping hint, for driver
 
virtual void setDirty ()=0
 flags the meshbuffer as changed, reloads hardware buffers
 
virtual dcpp::uint32_kt getChangedID () const =0
 Get the currently used ID for identification of changes.
 
- 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.
 

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

◆ getChangedID()

virtual dcpp::uint32_kt dcpp::scene::IVertexBuffer::getChangedID ( ) const
pure virtual

Get the currently used ID for identification of changes.

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

Implemented in dcpp::scene::PVertexBuffer.

◆ getData() [1/2]

virtual const void * dcpp::scene::IVertexBuffer::getData ( ) const
pure virtual

Const pointer to first element.

Implemented in dcpp::scene::PVertexBuffer.

◆ getData() [2/2]

virtual void * dcpp::scene::IVertexBuffer::getData ( )
pure virtual

Pointer to first element of vertex data.

Implemented in dcpp::scene::PVertexBuffer.

◆ getHardwareMappingHint()

virtual E_HARDWARE_MAPPING dcpp::scene::IVertexBuffer::getHardwareMappingHint ( ) const
pure virtual

get the current hardware mapping hint

Implemented in dcpp::scene::PVertexBuffer.

◆ operator[]()

virtual dcpp::video::S3DVertex & dcpp::scene::IVertexBuffer::operator[] ( dcpp::uint32_kt  index)
pure virtual

Direct access to elements. Risky to use!

The reference must be cast to the correct type before use. It's only dcpp::video::S3DVertex if getType is EVT_STANDARD. otherwise cast it first to a reference type derived from S3DVertex like S3DVertex2TCoords& or S3DVertexTangents&.

Implemented in dcpp::scene::PVertexBuffer.

◆ push_back()

virtual void dcpp::scene::IVertexBuffer::push_back ( const dcpp::video::S3DVertex element)
pure virtual

Add vertex to end.

Implemented in dcpp::scene::PVertexBuffer.

◆ setDirty()

virtual void dcpp::scene::IVertexBuffer::setDirty ( )
pure virtual

flags the meshbuffer as changed, reloads hardware buffers

Implemented in dcpp::scene::PVertexBuffer.

◆ setHardwareMappingHint()

virtual void dcpp::scene::IVertexBuffer::setHardwareMappingHint ( E_HARDWARE_MAPPING  NewMappingHint)
pure virtual

set the hardware mapping hint, for driver

Implemented in dcpp::scene::PVertexBuffer.

◆ setValue()

virtual void dcpp::scene::IVertexBuffer::setValue ( dcpp::uint32_kt  index,
const dcpp::video::S3DVertex value 
)
pure virtual

Set value at index. Buffer must be already large enough that element exists.

Implemented in dcpp::scene::PVertexBuffer.

◆ size()

virtual dcpp::uint32_kt dcpp::scene::IVertexBuffer::size ( ) const
pure virtual

Number of elements.

Implemented in dcpp::scene::PVertexBuffer.

◆ stride()

virtual dcpp::uint32_kt dcpp::scene::IVertexBuffer::stride ( ) const
pure virtual

Number of bytes per element.

Implemented in dcpp::scene::PVertexBuffer.


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

Duckcpp    @cppfx.xyz