|
| IndexStream () |
|
template<class T > |
| IndexStream (const Array< T > &source, const shared_ptr< VertexBuffer > &_area) |
|
template<class T > |
| IndexStream (const T *sourcePtr, int _numElements, const shared_ptr< VertexBuffer > &_area) |
|
template<class T > |
| IndexStream (const T &ignored, int _numElements, const shared_ptr< VertexBuffer > &dstPtr) |
|
shared_ptr< VertexBuffer > | area () |
|
shared_ptr< VertexBuffer > | area () const |
|
shared_ptr< VertexBuffer > | buffer () |
| The G3D::VertexBuffer containing this AttributeArray. More...
|
|
shared_ptr< VertexBuffer > | buffer () const |
| The G3D::VertexBuffer containing this AttributeArray. More...
|
|
size_t | elementSize () const |
| Size of one element in bytes.
More...
|
|
uint64 | generation () const |
|
void * | mapBuffer (GLenum permissions) |
| Return a pointer to CPU-addressable memory for this AttributeArray. More...
|
|
size_t | maxSize () const |
| Maximum size that can be loaded via update into this AttributeArray. More...
|
|
bool | normalizedFixedPoint () |
| True if this vertex is storing numbers in normalized fixed point format. More...
|
|
virtual GLenum | openGLTarget () const |
| Target argument for glBufferData and other raw OpenGL routines. More...
|
|
bool | operator== (const AttributeArray &other) const |
|
template<class T > |
void | set (int index, const T &value) |
| Overwrites a single element of an existing array without changing the number of elements. More...
|
|
void | setNormalizedFixedPoint (bool b) |
|
int | size () const |
| Number of elements in this array (not byte size!) More...
|
|
void * | startAddress () const |
| For VBO_MEMORY, this is the offset. More...
|
|
size_t | stride () const |
| Space between subsequent elements in bytes, must be either zero or >= m_elementSize.
More...
|
|
GLenum | underlyingRepresentation () const |
|
void | unmapBuffer () |
| Release CPU addressable memory previously returned by mapBuffer. More...
|
|
template<class T > |
void | update (const T *sourcePtr, int _numElements) |
|
template<class T > |
void | update (const Array< T > &source) |
| Overwrites existing data with data of the same size or smaller. More...
|
|
bool | valid () const |
| Returns true if this AttributeArray can be used for rendering (i.e., contains data and the parent VertexBuffer has not been reset). More...
|
|
|
template<class T1 , class T2 , class T3 , class T4 , class T5 > |
static void | createInterleaved (const Array< T1 > &src1, AttributeArray &var1, const Array< T2 > &src2, AttributeArray &var2, const Array< T3 > &src3, AttributeArray &var3, const Array< T4 > &src4, AttributeArray &var4, const Array< T5 > &src5, AttributeArray &var5, const shared_ptr< VertexBuffer > &area) |
| Creates five interleaved AttributeArray arrays simultaneously. More...
|
|
template<class T1 , class T2 , class T3 , class T4 > |
static void | createInterleaved (const Array< T1 > &src1, AttributeArray &var1, const Array< T2 > &src2, AttributeArray &var2, const Array< T3 > &src3, AttributeArray &var3, const Array< T4 > &src4, AttributeArray &var4, const shared_ptr< VertexBuffer > &area) |
|
template<class T1 , class T2 , class T3 , class T4 , class T5 > |
static void | updateInterleaved (const Array< T1 > &src1, AttributeArray &var1, const Array< T2 > &src2, AttributeArray &var2, const Array< T3 > &src3, AttributeArray &var3, const Array< T4 > &src4, AttributeArray &var4, const Array< T5 > &src5, AttributeArray &var5) |
| Update a set of interleaved arrays. More...
|
|
template<class T1 , class T2 , class T3 , class T4 > |
static void | updateInterleaved (const Array< T1 > &src1, AttributeArray &var1, const Array< T2 > &src2, AttributeArray &var2, const Array< T3 > &src3, AttributeArray &var3, const Array< T4 > &src4, AttributeArray &var4) |
|
|
void | init (AttributeArray &dstPtr, size_t dstOffset, GLenum glformat, size_t eltSize, int numElements, size_t stride, bool normalizedFixedPoint) |
| For uploading interleaved arrays. More...
|
|
void | init (const void *sourcePtr, int numElements, shared_ptr< VertexBuffer > area, GLenum glformat, size_t eltSize, bool normalizedFixedPoint) |
|
void | init (const void *srcPtr, int numElements, size_t srcStride, GLenum glformat, size_t eltSize, AttributeArray dstPtr, size_t dstOffset, size_t dstStride, bool normalizedFixedPoint) |
|
const void * | pointer () const |
| May be an OpenGL video memory offset or a real memory pointer. More...
|
|
void | set (int index, const void *value, GLenum glformat, size_t eltSize) |
|
void | update (const void *sourcePtr, int _numElements, GLenum glformat, size_t eltSize, bool normalizedFixedPoint) |
|
void | uploadToCard (const void *sourcePtr, size_t dstPtrOffsetElements, size_t size) |
| Performs the actual memory transfer (like memcpy). More...
|
|
void | uploadToCardStride (const void *sourcePtr, size_t srcElements, size_t srcSizeBytes, size_t srcStrideBytes, size_t dstPtrOffsetBytes, size_t dstStrideBytes) |
| Used for creating interleaved arrays. More...
|
|
void | vertexAttribPointer (unsigned int attribNum) const |
|
A stream of indices referencing into an AttributeBuffer
- See also
- AttributeArray, VertexBuffer
(Do not take advantage of the fact that this is a subclass of AttributeArray.)
template<class T1 , class T2 , class T3 , class T4 , class T5 >
static void G3D::AttributeArray::createInterleaved |
( |
const Array< T1 > & |
src1, |
|
|
AttributeArray & |
var1, |
|
|
const Array< T2 > & |
src2, |
|
|
AttributeArray & |
var2, |
|
|
const Array< T3 > & |
src3, |
|
|
AttributeArray & |
var3, |
|
|
const Array< T4 > & |
src4, |
|
|
AttributeArray & |
var4, |
|
|
const Array< T5 > & |
src5, |
|
|
AttributeArray & |
var5, |
|
|
const shared_ptr< VertexBuffer > & |
area |
|
) |
| |
|
inlinestaticinherited |
Creates five interleaved AttributeArray arrays simultaneously.
Creates five interleaved AttributeArray arrays simultaneously. This is convenient for uploading vertex, normal, texcoords, and tangent arrays although it can be used for any five arrays. This is substantially faster than creating a single "void AttributeArray" and uploading arrays within it using a stride.
The varn arguments are outputs only; they should not be initialized values.
All src arrays must have the same length or be empty. Empty arrays will return an uninitialized var.
- See also
- updateInterleaved
Referenced by G3D::AttributeArray::createInterleaved().
void* G3D::AttributeArray::mapBuffer |
( |
GLenum |
permissions | ) |
|
|
inherited |
Return a pointer to CPU-addressable memory for this AttributeArray.
The buffer must be unmapped later before any rendering calls are made. This contains a glPushClientAttrib call that must be matched by unmapBuffer.
Works for both CPU memory and VBO memory AttributeArray.
This method of moving data is not typesafe and is not recommended.
- Parameters
-
permissions | Same as the argument to glMapBufferARB: GL_READ_ONLY , GL_WRITE_ONLY , or GL_READ_WRITE . |
Referenced by G3D::AttributeArray::updateInterleaved().
void* G3D::AttributeArray::startAddress |
( |
| ) |
const |
|
inlineinherited |
For VBO_MEMORY, this is the offset.
For MAIN_MEMORY, this is a pointer to the block of uploaded memory.
When there was a dstOffset as a constructor argument, it has already been applied here.