|
Carna
Version 3.0.1
|
Specializes IndexBufferBase for particular IndexType. More...
#include <IndexBuffer.h>
Inheritance diagram for Carna::base::IndexBuffer< IndexType >:
Collaboration diagram for Carna::base::IndexBuffer< IndexType >:Public Types | |
| typedef IndexType | Index |
| Holds the index type maintained by this index buffer object. | |
Public Member Functions | |
| IndexBuffer (unsigned int primitiveType) | |
Creates GL_ELEMENT_ARRAY_BUFFER object. More... | |
| void | copy (const IndexType *indicesPtr, const std::size_t indicesCount) |
| Copies indicesCount indices referenced by indicesPtr to the maintained index buffer object. | |
Public Member Functions inherited from Carna::base::IndexBufferBase | |
| IndexBufferBase (unsigned int type, unsigned int primitiveType) | |
Creates GL_ELEMENT_ARRAY_BUFFER object. More... | |
Public Member Functions inherited from Carna::base::BaseBuffer | |
| virtual | ~BaseBuffer () |
| Deletes the maintained OpenGL buffer object. | |
| std::size_t | size () const |
| Tells the previously set size of the maintained buffer object. | |
| void | bind () const |
Invokes glBindBuffer to bind the maintained buffer object to target. | |
| bool | isValid () const |
| Tells whether the buffer object was marked as valid. | |
Additional Inherited Members | |
Public Attributes inherited from Carna::base::IndexBufferBase | |
| 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. | |
Public Attributes inherited from Carna::base::BaseBuffer | |
| 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 Public Attributes inherited from Carna::base::IndexBufferBase | |
| 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. | |
Protected Member Functions inherited from Carna::base::IndexBufferBase | |
| 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. | |
Protected Member Functions inherited from Carna::base::BaseBuffer | |
| BaseBuffer (unsigned int target) | |
| Acquires new OpenGL buffer object. More... | |
| void | setSize (std::size_t size) |
| Sets the size of the maintained buffer object. | |
Protected Attributes inherited from Carna::base::BaseBuffer | |
| bool | valid |
| Flag that indicates whether the maintained OpenGL buffer object is valid. | |
Specializes IndexBufferBase for particular IndexType.
Definition at line 204 of file IndexBuffer.h.
| Carna::base::IndexBuffer< IndexType >::IndexBuffer | ( | unsigned int | primitiveType | ) |
Creates GL_ELEMENT_ARRAY_BUFFER object.
| primitiveType | indicates how primitives should be assembled from the vertices indexed by this buffer. |
Definition at line 233 of file IndexBuffer.h.
Documentation generated by Doxygen