Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IIndexBuffer.hpp
1// Copyright (C) 2008-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in nirtcpp/nirtcpp.hpp
4
5#ifndef NIRT_I_INDEX_BUFFER_HPP_INCLUDED
6#define NIRT_I_INDEX_BUFFER_HPP_INCLUDED
7
8#include <nirtcpp/core/engine/IReferenceCounted.hpp>
9#include <nirtcpp/core/engine/irrArray.hpp>
10#include <nirtcpp/core/engine/EHardwareBufferFlags.hpp>
11#include <nirtcpp/core/engine/SVertexIndex.hpp>
12
13namespace nirt
14{
15
16namespace scene
17{
18
19 class IIndexBuffer : public virtual IReferenceCounted
20 {
21 public:
22
24 virtual void* getData() =0;
25
27 virtual const void* getData() const =0;
28
30 void* pointer() { return getData(); }
31
32 virtual video::E_INDEX_TYPE getType() const =0;
33
35
38 virtual void setType(video::E_INDEX_TYPE IndexType) =0;
39
41 virtual u32 stride() const =0;
42
44 virtual u32 size() const =0;
45
47 virtual void push_back(u32 value) =0;
48
50
51 virtual void setValue(u32 index, u32 value) =0;
52
54 virtual u32 operator [](u32 index) const =0;
55 virtual u32 getLast() =0;
56
57 virtual void set_used(u32 usedNow) =0;
58 virtual void reallocate(u32 new_size, bool canShrink=true) =0;
59 virtual u32 allocated_size() const=0;
60
63
65 virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0;
66
68 virtual void setDirty() = 0;
69
71
72 virtual u32 getChangedID() const = 0;
73 };
74
75
76} // end namespace scene
77} // end namespace nirt
78
79#endif
Base class of most objects of the Nirtcpp Engine.
Definition IReferenceCounted.hpp:46
Definition IIndexBuffer.hpp:20
virtual void * getData()=0
Pointer to first element.
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0
get the current hardware mapping hint
void * pointer()
Same as getData(), just closer to core::array interface.
Definition IIndexBuffer.hpp:30
virtual u32 operator[](u32 index) const =0
Access element value at given index.
virtual void setType(video::E_INDEX_TYPE IndexType)=0
Change between 16 and 32 bit indices.
virtual u32 stride() const =0
Number of bytes per element.
virtual void setDirty()=0
flags the meshbuffer as changed, reloads hardware buffers
virtual u32 getChangedID() const =0
Get the currently used ID for identification of changes.
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)=0
set the hardware mapping hint, for driver
virtual u32 size() const =0
Number of elements.
virtual const void * getData() const =0
Const pointer to first element.
virtual void push_back(u32 value)=0
Add value to end. Note that for 16 bit index types values shouldn't be larger than u16.
virtual void setValue(u32 index, u32 value)=0
Set value at index. Note that for 16 bit index types values shouldn't be larger than u16.
E_HARDWARE_MAPPING
Definition EHardwareBufferFlags.hpp:14
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print