5 #ifndef __C_INDEX_BUFFER_H_INCLUDED__
6 #define __C_INDEX_BUFFER_H_INCLUDED__
21 virtual ~IIndexList(){};
37 class CSpecificIndexList :
public IIndexList
42 virtual u32 stride()
const {
return sizeof(T);}
49 Indices.push_back((
const T&)element);
76 return Indices.allocated_size();
83 if (
sizeof(T)==
sizeof(
u16))
103 for (
u32 n=0;n<IndexBufferCopy.
size();++n)
115 IIndexList *NewIndices=0;
121 NewIndices=
new CSpecificIndexList<u16>;
126 NewIndices=
new CSpecificIndexList<u32>;
133 NewIndices->reallocate(
Indices->size() );
136 NewIndices->push_back((*
Indices)[n]);
172 Indices->setValue(index, value);
187 return Indices->allocated_size();
Self reallocating template array (like stl vector) with additional features.
virtual video::E_INDEX_TYPE getType() const
virtual void setValue(u32 index, u32 value)
virtual u32 allocated_size() const
virtual void push_back(const u32 &element)
CIndexBuffer(const IIndexBuffer &IndexBufferCopy)
virtual void setDirty()
flags the mesh as changed, reloads hardware buffers
virtual u32 getChangedID() const
Get the currently used ID for identification of changes.
CIndexBuffer(video::E_INDEX_TYPE IndexType)
virtual void setType(video::E_INDEX_TYPE IndexType)
virtual void reallocate(u32 new_size)
virtual u32 stride() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const
get the current hardware mapping hint
E_HARDWARE_MAPPING MappingHint
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)
set the hardware mapping hint, for driver
virtual u32 operator[](u32 index) const
virtual void set_used(u32 usedNow)
virtual u32 size() const =0
virtual video::E_INDEX_TYPE getType() const =0
@ EHM_NEVER
Don't store on the hardware.
Everything in the Irrlicht Engine can be found in this namespace.
unsigned int u32
32 bit unsigned variable.
unsigned short u16
16 bit unsigned variable.