fluidvis
Public Member Functions | Public Attributes | List of all members
sx::VertexBuffer Struct Reference

#include <SXCore.h>

Public Member Functions

EX float * unlock ()
 
EX const float * unlockRead ()
 
EX float * unlockWrite ()
 
EX void lock ()
 

Public Attributes

string ID
 
string outputID
 
unsigned int bufferID
 
unsigned int location
 
unsigned int attributeSize
 

Detailed Description

a VBO

Member Function Documentation

EX void sx::VertexBuffer::lock ( )

The invocation of lock () invalidates the returned pointers from unlock(), unlockRead() and unlockWrite(), on the client side (CPU, but the dataset still exists on the GPU after the lock() operation). lock() must be called as soon as possible after the invocation of unlock(), unlockRead() or unlockWrite().

EX float* sx::VertexBuffer::unlock ( )

Returns a pointer to the vertex buffer. Writing and reading from the returned array is possible. After usage, lock() must be invoked.

EX const float* sx::VertexBuffer::unlockRead ( )

Returns a pointer to the vertex buffer. Only reading from the returned array is possible. After usage, lock() must be invoked.

EX float* sx::VertexBuffer::unlockWrite ( )

Returns a pointer to the vertex buffer. Only writing data to the returned array is possible. After usage, lock() must be invoked.

Member Data Documentation

unsigned int sx::VertexBuffer::attributeSize

number of components per vertexattribute

unsigned int sx::VertexBuffer::bufferID

id in VRam of the vertex buffer object

string sx::VertexBuffer::ID

name of the vertex attribute used by shaders

unsigned int sx::VertexBuffer::location

location of attribute buffer, must be unique in the set of all attribute buffers used simultaneously

string sx::VertexBuffer::outputID

name of the vertex attribute used by shader vertex output


The documentation for this struct was generated from the following file: