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();
virtual void setDirty()
flags the mesh as changed, reloads hardware buffers
CIndexBuffer(video::E_INDEX_TYPE IndexType)
virtual u32 operator[](u32 index) const
virtual void push_back(const u32 &element)
Don't store on the hardware.
virtual u32 size() const =0
unsigned short u16
16 bit unsigned variable.
virtual void setType(video::E_INDEX_TYPE IndexType)
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const
get the current hardware mapping hint
virtual video::E_INDEX_TYPE getType() const =0
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)
set the hardware mapping hint, for driver
unsigned int u32
32 bit unsigned variable.
virtual void reallocate(u32 new_size)
virtual u32 getChangedID() const
Get the currently used ID for identification of changes.
virtual u32 stride() const
virtual void set_used(u32 usedNow)
virtual void setValue(u32 index, u32 value)
virtual u32 allocated_size() const
virtual video::E_INDEX_TYPE getType() const
E_HARDWARE_MAPPING MappingHint
CIndexBuffer(const IIndexBuffer &IndexBufferCopy)