opengl_ebo_structure
OpenGL element buffer (EBO) holding the triangle indices (uint3) of an indexed mesh.
Derives from: opengl_gpu_buffer
Fields and methods
Members of the struct opengl_ebo_structure. Most of what you do with a CGP type goes through the free functions listed below.
Methods
| Allocates a new EBO (glBufferData on GL_ELEMENT_ARRAY_BUFFER, GL_DYNAMIC_DRAW) holding the triangle indices and stores its id and size (number of triangles); prints a warning if the EBO was already allocated, whose memory is then lost. src |
Inherited from opengl_gpu_buffer (7 members)
Fields
GLuint id = 0 | OpenGL id of the buffer, 0 when it is not allocated. |
GLuint size = 0 | Number of elements in the buffer (a vec3 or a uint3 counts as one element), 0 when empty. |
GLenum type = 0 | OpenGL target of the buffer, GL_ARRAY_BUFFER for a VBO and GL_ELEMENT_ARRAY_BUFFER for an EBO. |
opengl_gpu_buffer_details details | Allocated size in bytes, number of components per element (2, 3 or 4) and component type (GL_FLOAT), used to describe the buffer to the VAO. |
Functions taking a opengl_ebo_structure
None.
Functions returning a opengl_ebo_structure
None.
Operators
None.