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

Public Member Functions

 PVertexBuffer (video::E_VERTEX_TYPE vertexType)
 
 PVertexBuffer (const IVertexBuffer &VertexBufferCopy)
 
virtual void setType (video::E_VERTEX_TYPE vertexType) override
 
virtual void * getData () override
 Pointer to first element of vertex data.
 
virtual const void * getData () const override
 Const pointer to first element.
 
virtual video::E_VERTEX_TYPE getType () const override
 
virtual u32 stride () const override
 Number of bytes per element.
 
virtual u32 size () const override
 Number of elements.
 
virtual void push_back (const video::S3DVertex &element) override
 Add vertex to end.
 
virtual void push_back (const video::S3DVertex2TCoords &element) override
 
virtual void push_back (const video::S3DVertexTangents &element) override
 
virtual void setValue (u32 index, const video::S3DVertex &value) override
 Set value at index. Buffer must be already large enough that element exists.
 
virtual void setValue (u32 index, const video::S3DVertex2TCoords &value) override
 
virtual void setValue (u32 index, const video::S3DVertexTangents &value) override
 
virtual video::S3DVertexoperator[] (u32 index) override
 Direct access to elements. Risky to use!
 
virtual video::S3DVertexoperator[] (const u32 index) const override
 
virtual video::S3DVertexgetLast () override
 
virtual void set_used (u32 usedNow) override
 
virtual void reallocate (u32 new_size, bool canShrink=true) override
 
virtual u32 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 u32 getChangedID () const override
 Get the currently used ID for identification of changes.
 
- Public Member Functions inherited from dcpp::scene::IVertexBuffer
virtual void * pointer ()
 Same as getData.
 
- 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.
 
i32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Public Attributes

IVertexList * Vertices
 
E_HARDWARE_MAPPING MappingHint
 
u32 ChangedID
 

Additional Inherited Members

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

Member Function Documentation

◆ allocated_size()

virtual u32 dcpp::scene::PVertexBuffer::allocated_size ( ) const
inlineoverridevirtual

◆ getChangedID()

virtual u32 dcpp::scene::PVertexBuffer::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::IVertexBuffer.

◆ getData() [1/2]

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

Const pointer to first element.

Implements dcpp::scene::IVertexBuffer.

◆ getData() [2/2]

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

Pointer to first element of vertex data.

Implements dcpp::scene::IVertexBuffer.

◆ getHardwareMappingHint()

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

get the current hardware mapping hint

Implements dcpp::scene::IVertexBuffer.

◆ getLast()

virtual video::S3DVertex & dcpp::scene::PVertexBuffer::getLast ( )
inlineoverridevirtual

◆ getType()

virtual video::E_VERTEX_TYPE dcpp::scene::PVertexBuffer::getType ( ) const
inlineoverridevirtual

◆ operator[]() [1/2]

virtual video::S3DVertex & dcpp::scene::PVertexBuffer::operator[] ( const u32  index) const
inlineoverridevirtual

◆ operator[]() [2/2]

virtual video::S3DVertex & dcpp::scene::PVertexBuffer::operator[] ( u32  index)
inlineoverridevirtual

Direct access to elements. Risky to use!

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

Implements dcpp::scene::IVertexBuffer.

◆ push_back() [1/3]

virtual void dcpp::scene::PVertexBuffer::push_back ( const video::S3DVertex element)
inlineoverridevirtual

Add vertex to end.

Implements dcpp::scene::IVertexBuffer.

◆ push_back() [2/3]

virtual void dcpp::scene::PVertexBuffer::push_back ( const video::S3DVertex2TCoords element)
inlineoverridevirtual

◆ push_back() [3/3]

virtual void dcpp::scene::PVertexBuffer::push_back ( const video::S3DVertexTangents element)
inlineoverridevirtual

◆ reallocate()

virtual void dcpp::scene::PVertexBuffer::reallocate ( u32  new_size,
bool  canShrink = true 
)
inlineoverridevirtual

◆ set_used()

virtual void dcpp::scene::PVertexBuffer::set_used ( u32  usedNow)
inlineoverridevirtual

◆ setDirty()

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

flags the mesh as changed, reloads hardware buffers

Implements dcpp::scene::IVertexBuffer.

◆ setHardwareMappingHint()

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

set the hardware mapping hint, for driver

Implements dcpp::scene::IVertexBuffer.

◆ setType()

virtual void dcpp::scene::PVertexBuffer::setType ( video::E_VERTEX_TYPE  vertexType)
inlineoverridevirtual

◆ setValue() [1/3]

virtual void dcpp::scene::PVertexBuffer::setValue ( u32  index,
const video::S3DVertex value 
)
inlineoverridevirtual

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

Implements dcpp::scene::IVertexBuffer.

◆ setValue() [2/3]

virtual void dcpp::scene::PVertexBuffer::setValue ( u32  index,
const video::S3DVertex2TCoords value 
)
inlineoverridevirtual

◆ setValue() [3/3]

virtual void dcpp::scene::PVertexBuffer::setValue ( u32  index,
const video::S3DVertexTangents value 
)
inlineoverridevirtual

◆ size()

virtual u32 dcpp::scene::PVertexBuffer::size ( ) const
inlineoverridevirtual

Number of elements.

Implements dcpp::scene::IVertexBuffer.

◆ stride()

virtual u32 dcpp::scene::PVertexBuffer::stride ( ) const
inlineoverridevirtual

Number of bytes per element.

Implements dcpp::scene::IVertexBuffer.


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

Duckcpp    @cppfx.xyz