Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classStelIndexBuffer.html
Дата изменения: Unknown Дата индексирования: Fri Feb 28 07:34:52 2014 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п |
Stellarium 0.12.3
|
Generic index buffer interface usable with all Renderer backends. More...
#include <StelIndexBuffer.hpp>
Public Member Functions | |
virtual | ~StelIndexBuffer () |
Virtual destructor. More... | |
void | addIndex (const uint index) |
Add a new index to the end of the buffer. More... | |
uint | getIndex (const int which) const |
Return index at specified position in the buffer. More... | |
void | setIndex (const int which, const uint index) |
Set specified index in the buffer. More... | |
void | clear () |
Clear the buffer, removing all indices. More... | |
void | lock () |
Lock the buffer. Must be called before drawing. More... | |
void | unlock () |
Unlock the buffer. Must be called to modify the buffer after drawing. More... | |
bool | locked () const |
Is this buffer locked? More... | |
IndexType | indexType () const |
Get type of indices (16bit or 32bit) More... | |
int | length () const |
Returns the number of indices in the buffer. More... | |
Protected Member Functions | |
StelIndexBuffer (IndexType indexType) | |
Initialize data common for all index buffer implementations. More... | |
virtual void | addIndex_ (const uint index)=0 |
Implementation of addIndex. More... | |
virtual uint | getIndex_ (const int which) const =0 |
Implementation of getIndex. More... | |
virtual void | setIndex_ (const int which, const uint index)=0 |
Implementation of setIndex. More... | |
virtual void | clear_ ()=0 |
Implementation of clear. More... | |
virtual void | lock_ ()=0 |
Implementation of lock. More... | |
virtual void | unlock_ ()=0 |
Implementation of unlock. More... | |
Protected Attributes | |
const IndexType | indexType_ |
Index type used (16 or 32 bit) More... | |
Generic index buffer interface usable with all Renderer backends.
Used to specify order in which vertices from a vertex buffer are drawn (allowing to e.g. draw the same vertex in multiple triangles without duplicating it, saving memory and RAM-VRAM bandwidth).
Definition at line 45 of file StelIndexBuffer.hpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 49 of file StelIndexBuffer.hpp.
|
inlineprotected |
Initialize data common for all index buffer implementations.
Definition at line 150 of file StelIndexBuffer.hpp.
|
inline |
Add a new index to the end of the buffer.
The buffer must not be locked.
index | Index to add. |
Definition at line 56 of file StelIndexBuffer.hpp.
|
protectedpure virtual |
|
inline |
Clear the buffer, removing all indices.
Can only be called when unlocked.
The backend might reuse previously allocated storage after clearing, so calling clear() might be more efficient than destroying a buffer and then constructing a new one.
Definition at line 106 of file StelIndexBuffer.hpp.
|
protectedpure virtual |
|
inline |
Return index at specified position in the buffer.
The buffer must not be locked.
which | Position of the index to get. |
Definition at line 73 of file StelIndexBuffer.hpp.
|
protectedpure virtual |
|
inline |
Get type of indices (16bit or 32bit)
Definition at line 134 of file StelIndexBuffer.hpp.
|
inline |
Returns the number of indices in the buffer.
Definition at line 140 of file StelIndexBuffer.hpp.
|
inline |
Lock the buffer. Must be called before drawing.
Definition at line 114 of file StelIndexBuffer.hpp.
|
protectedpure virtual |
|
inline |
Is this buffer locked?
Definition at line 128 of file StelIndexBuffer.hpp.
|
inline |
Set specified index in the buffer.
The buffer must not be locked.
which | Position of the index to set. |
index | Value to set the index to. |
Definition at line 88 of file StelIndexBuffer.hpp.
|
protectedpure virtual |
|
inline |
Unlock the buffer. Must be called to modify the buffer after drawing.
Definition at line 121 of file StelIndexBuffer.hpp.
|
protectedpure virtual |
|
protected |
Index type used (16 or 32 bit)
Definition at line 147 of file StelIndexBuffer.hpp.