mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Split CIndexBuffer from CMeshBuffer
This commit is contained in:
parent
5d6e15bc49
commit
47e4c33a50
13 changed files with 197 additions and 104 deletions
|
@ -12,40 +12,33 @@
|
|||
namespace irr
|
||||
{
|
||||
|
||||
namespace video
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
namespace scene
|
||||
{
|
||||
|
||||
class IIndexBuffer : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
//! Get type of index data which is stored in this meshbuffer.
|
||||
/** \return Index type of this buffer. */
|
||||
virtual video::E_INDEX_TYPE getType() const = 0;
|
||||
|
||||
//! Get access to indices.
|
||||
/** \return Pointer to indices array. */
|
||||
virtual const void *getData() const = 0;
|
||||
|
||||
//! Get access to indices.
|
||||
/** \return Pointer to indices array. */
|
||||
virtual void *getData() = 0;
|
||||
|
||||
virtual video::E_INDEX_TYPE getType() const = 0;
|
||||
virtual void setType(video::E_INDEX_TYPE IndexType) = 0;
|
||||
|
||||
virtual u32 stride() const = 0;
|
||||
|
||||
virtual u32 size() const = 0;
|
||||
virtual void push_back(const u32 &element) = 0;
|
||||
virtual u32 operator[](u32 index) const = 0;
|
||||
virtual u32 getLast() = 0;
|
||||
virtual void setValue(u32 index, u32 value) = 0;
|
||||
virtual void set_used(u32 usedNow) = 0;
|
||||
virtual void reallocate(u32 new_size) = 0;
|
||||
virtual u32 allocated_size() const = 0;
|
||||
|
||||
virtual void *pointer() = 0;
|
||||
//! Get amount of indices in this meshbuffer.
|
||||
/** \return Number of indices in this buffer. */
|
||||
virtual u32 getCount() const = 0;
|
||||
|
||||
//! get the current hardware mapping hint
|
||||
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const = 0;
|
||||
|
||||
//! set the hardware mapping hint, for driver
|
||||
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint) = 0;
|
||||
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint) = 0;
|
||||
|
||||
//! flags the meshbuffer as changed, reloads hardware buffers
|
||||
virtual void setDirty() = 0;
|
||||
|
@ -53,6 +46,10 @@ public:
|
|||
//! Get the currently used ID for identification of changes.
|
||||
/** This shouldn't be used for anything outside the VideoDriver. */
|
||||
virtual u32 getChangedID() const = 0;
|
||||
|
||||
//! Used by the VideoDriver to remember the buffer link.
|
||||
virtual void setHWBuffer(void *ptr) const = 0;
|
||||
virtual void *getHWBuffer() const = 0;
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue