Maintains GL_ELEMENT_ARRAY_BUFFER
object that holds the vertex indices, that interconnect the vertices to primitives. This class realizes the RAII-idiom.
More...
#include <IndexBuffer.h>
|
const unsigned int | type |
| Holds the element type of the maintained OpenGL buffer object.
|
|
const unsigned int | primitiveType |
| Holds how the indexed vertices do interconnect to primitives.
|
|
const unsigned int | target |
| Holds where the maintained buffer object is to be bound to by glBindBuffer .
|
|
const unsigned int | id |
| Holds the ID of the maintained OpenGL buffer object.
|
|
|
static const unsigned int | TYPE_UINT_8 |
| Indicates uint8_t element type.
|
|
static const unsigned int | TYPE_UINT_16 |
| Indicates uint16_t element type.
|
|
static const unsigned int | TYPE_UINT_32 |
| Indicates uint32_t element type.
|
|
static const unsigned int | PRIMITIVE_TYPE_TRIANGLES |
| Draws triangles. Indicates that the indices \(3i+k, k \in \left\{0,1,2\right\}\) make up the \(i\)th triangle with \(i \geq 2\).
|
|
static const unsigned int | PRIMITIVE_TYPE_TRIANGLE_STRIP |
| Draws triangles. Indicates that the indices \(i-k, k \in \left\{0,1,2\right\}\) make up the \(i\)th triangle with \(i \geq 2\).
|
|
static const unsigned int | PRIMITIVE_TYPE_TRIANGLE_FAN |
| Draws triangles. Indicates that the indices \(0, i-2, i-1\) make up the \(i\)th triangle with \(i \geq 2\).
|
|
static const unsigned int | PRIMITIVE_TYPE_LINES |
| Draws lines. Indicates that the indices \(2i, 2i-1\) make up the \(i\)th line segment with \(i \geq 1\).
|
|
static const unsigned int | PRIMITIVE_TYPE_LINE_STRIP |
| Draws lines. Indicates that the indices \(i, i-1\) make up a the \(i\)th line segment with \(i \geq 1\).
|
|
static const unsigned int | PRIMITIVE_TYPE_LINE_LOOP |
| Draws lines. Indicates that the indices \(i, i-1\) make up the \(i\)th line segment. Another line segment from the last to the first index is added automatically.
|
|
static const unsigned int | PRIMITIVE_TYPE_POINTS |
| Draws points. Indicates that each index makes up a single point.
|
|
|
void | copy (const void *bufferPtr, std::size_t bufferSize, std::size_t indicesCount) |
| Copies indicesCount indices referenced by bufferPtr to the maintained index buffer object.
|
|
| BaseBuffer (unsigned int target) |
| Acquires new OpenGL buffer object. More...
|
|
void | setSize (std::size_t size) |
| Sets the size of the maintained buffer object.
|
|
|
bool | valid |
| Flag that indicates whether the maintained OpenGL buffer object is valid.
|
|
Maintains GL_ELEMENT_ARRAY_BUFFER
object that holds the vertex indices, that interconnect the vertices to primitives. This class realizes the RAII-idiom.
- Author
- Leonid Kostrykin
- Date
- 1.9.14 - 14.3.15
Definition at line 43 of file IndexBuffer.h.
◆ IndexBufferBase()
Carna::base::IndexBufferBase::IndexBufferBase |
( |
unsigned int |
type, |
|
|
unsigned int |
primitiveType |
|
) |
| |
Creates GL_ELEMENT_ARRAY_BUFFER
object.
- Parameters
-
type | indicates the element type of the maintained OpenGL buffer object. |
primitiveType | indicates how primitives should be assembled from the vertices indexed by this buffer. |
The documentation for this class was generated from the following file: