|
CGAL 4.13.1 - Three
|
#include <CGAL/Three/Buffer_objects.h>
The Vbo struct is a wrapper for the QOpenGLBufferObject item.
It contains the data necessary for the rendering of any displayed entity. A Vbo can be shared between Vaos of the same context.
Public Member Functions | |
| Vbo (const char *attribute, Flag flag, QOpenGLBuffer::Type vbo_type=QOpenGLBuffer::VertexBuffer, GLenum data_type=GL_FLOAT, int offset=0, int tupleSize=3, int stride=0) | |
Creates a Vbo. More... | |
| bool | bind () |
Makes the Vbo active until release() is called. | |
| void | release () |
Makes the Vbo and its program not active. | |
| void | allocate (void *data, int datasize) |
| allocate gives CPU data to the GPU. More... | |
| CGAL::Three::Vbo::Vbo | ( | const char * | attribute, |
| Flag | flag, | ||
| QOpenGLBuffer::Type | vbo_type = QOpenGLBuffer::VertexBuffer, |
||
| GLenum | data_type = GL_FLOAT, |
||
| int | offset = 0, |
||
| int | tupleSize = 3, |
||
| int | stride = 0 |
||
| ) |
Creates a Vbo.
| attribute | the name of the corresponding data in the shader. |
| flag | the flag that specifies which type of data this corresponds to. |
| vbo_type | is almost always QOpenGLBuffer::VertexBuffer but can be QOpenGLBuffer::IndexBuffer if it contains the indices for an indexed rendering. |
| data_type | the GL data type. Mostly GL_FLOAT. |
| offset | the offset in the buffer. See OpenGL documentation. |
| tupleSize | the size of the tuple. If it contains vector_3s, then tuple_size is 3. |
| stride | the stride for the buffer. See OpenGL documentation. |
| void CGAL::Three::Vbo::allocate | ( | void * | data, |
| int | datasize | ||
| ) |
allocate gives CPU data to the GPU.
| data | the content of the buffer. |
| datasize | the number of bytes in data. |