|
Coin3D is Free Software, published under the BSD 3-clause license. |
https://bitbucket.org/Coin3D/ http://www.kongsberg.com/kogt/ |
The SoVBO class is used to handle OpenGL vertex buffer objects. More...
Public Member Functions | |
| SoVBO (const GLenum target=0x8892, const GLenum usage=0x88E4) | |
| ~SoVBO () | |
| void | setBufferData (const GLvoid *data, intptr_t size, uint32_t dataid=0) |
| void * | allocBufferData (intptr_t size, uint32_t dataid=0) |
| uint32_t | getBufferDataId (void) const |
| void | getBufferData (const GLvoid *&data, intptr_t &size) |
| void | bindBuffer (uint32_t contextid) |
Static Public Member Functions | |
| static void | init (void) |
| static void | setVertexCountLimits (const int minlimit, const int maxlimit) |
| static int | getVertexCountMinLimit (void) |
| static int | getVertexCountMaxLimit (void) |
| static void | testGLPerformance (const uint32_t contextid) |
| static SbBool | shouldCreateVBO (SoState *state, const uint32_t contextid, const int numdata) |
| static SbBool | shouldRenderAsVertexArrays (SoState *statea, const uint32_t contextid, const int numdata) |
The SoVBO class is used to handle OpenGL vertex buffer objects.
It wraps the buffer handling, taking care of multi-context handling and allocation/deallocation of buffers. FIXME: more doc.
| SoVBO::SoVBO | ( | const GLenum | target = 0x8892, |
| const GLenum | usage = 0x88E4 |
||
| ) |
Constructor
| SoVBO::~SoVBO | ( | ) |
Destructor
| void SoVBO::setBufferData | ( | const GLvoid * | data, |
| intptr_t | size, | ||
| uint32_t | dataid = 0 |
||
| ) |
Sets the buffer data. dataid is a unique id used to identify the buffer data. In Coin it's possible to use the node id (SoNode::getNodeId()) to test if a buffer is valid for a node.
| void * SoVBO::allocBufferData | ( | intptr_t | size, |
| uint32_t | dataid = 0 |
||
| ) |
Used to allocate buffer data. The user is responsible for filling in the correct type of data in the buffer before the buffer is used.
| uint32_t SoVBO::getBufferDataId | ( | void | ) | const |
Returns the buffer data id.
| void SoVBO::getBufferData | ( | const GLvoid *& | data, |
| intptr_t & | size | ||
| ) |
Returns the data pointer and size.
| void SoVBO::bindBuffer | ( | uint32_t | contextid | ) |
Binds the buffer for the context contextid.
|
static |
Sets the global limits on the number of vertex data in a node before vertex buffer objects are considered to be used for rendering.
|
static |
Returns the vertex VBO minimum limit.
|
static |
Returns the vertex VBO maximum limit.