|
QSDK 1.1 Documentation |
#include <Q/draw.h>
Inheritance diagram for Draw::VertexArray:

Public Types | |
| enum | Access { ReadOnly, ReadWrite, WriteOnly, Truncate, Append } |
Public Member Functions | |
| virtual | ~VertexArray () |
| virtual Renderer * | renderer () const=0 |
| virtual size_t | size () const=0 |
| virtual unsigned int | format () const=0 |
| virtual size_t | vertexSize () const=0 |
| virtual Utils::Result | resize (size_t newsize)=0 |
| virtual Utils::Result | reserve (size_t newsize)=0 |
| virtual void * | at (size_t index)=0 |
| virtual Utils::Result | set (size_t index, const void *value)=0 |
| virtual size_t | add (const void *value)=0 |
| virtual Utils::Result | addRef (size_t index)=0 |
| virtual Utils::Result | decRef (size_t index)=0 |
| virtual size_t | refCount (size_t index)=0 |
| virtual void * | lock (Access a)=0 |
| virtual Utils::Result | unlock ()=0 |
The format of vertices in the array is fixed when it is created but the size can be changed at any time by calling resize(unsigned int).
|
|
|
Destroy the vertex array, reclaiming memory. |
|
|
Add a vertex to the array. The array is first searched to find if a vertex with the same contents exists and if so, that index is returned. The array keeps a reference count for each vertex added in this way. |
|
|
Increment the reference count of a vertex in the array. |
|
|
Return a pointer to the vertex at the given index. If the array is not locked, an exception will be generated. |
|
|
Decrement the reference count of a vertex in the array and if the count reaches zero, add the vertex to a list of free vertices. When a vertex is allocated using add(void*), vertices are taken from the free list before extending the array. |
|
|
Return the format of the vertices. |
|
|
Lock the array to obtain a pointer to its contents. If the array is already locked (either by another thread in the application or internally for asynchronous rendering) then the calling thread blocks until the array is unlocked. |
|
|
Return the reference count of a vertex. |
|
|
Return the renderer that owns the vertex array. |
|
|
Reserve space for allocating vertices. This is a hint that the size of the array may be increased to this size as a result of calling add. |
|
|
Resize the array. If the array is increasing in size, new vertices will contain default values. |
|
||||||||||||
|
Set one vertex in the array to the given value (which should point at memory formatted according to the array's vertex format). If the array is locked then it will work with the currently locked status, otherwise it will lock the array WriteOnly. Multiple calls to set on an unlocked array will seriously degrade performance. A call to set of an array locked ReadOnly will throw an exception. |
|
|
Return a count of how many vertices are in the array. |
|
|
Unlock the array. |
|
|
Return the size of an individual vertex. |
|
|
|
Qube Software Limited © 2000-2004
|
|