15#ifndef INDEXBUFFER_H_6014714286
16#define INDEXBUFFER_H_6014714286
140template<
typename IndexType >
143 static_assert(
sizeof(
IndexType ) < 0,
"Unknown index type." );
205template<
typename IndexType >
234template<
typename IndexType >
241template<
typename IndexType >
Defines LibCarna::base::BaseBuffer.
Contains forward-declarations.
Represents an association.
Implements OpenGL buffer objects maintenance RAII base class.
Maintains GL_ELEMENT_ARRAY_BUFFER object that holds the vertex indices, that interconnect the vertice...
const unsigned int primitiveType
Holds how the indexed vertices do interconnect to primitives.
static const unsigned int PRIMITIVE_TYPE_LINE_LOOP
Draws lines. Indicates that the indices make up the th line segment. Another line segment from the l...
static const unsigned int PRIMITIVE_TYPE_TRIANGLES
Draws triangles. Indicates that the indices make up the th triangle with .
const unsigned int type
Holds the element type of the maintained OpenGL buffer object.
static const unsigned int PRIMITIVE_TYPE_LINES
Draws lines. Indicates that the indices make up the th line segment with .
static const unsigned int TYPE_UINT_32
Indicates uint32_t element type.
static const unsigned int PRIMITIVE_TYPE_POINTS
Draws points. Indicates that each index makes up a single point.
static const unsigned int PRIMITIVE_TYPE_TRIANGLE_STRIP
Draws triangles. Indicates that the indices make up the th triangle with .
static const unsigned int TYPE_UINT_8
Indicates uint8_t element type.
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.
static const unsigned int TYPE_UINT_16
Indicates uint16_t element type.
IndexBufferBase(unsigned int type, unsigned int primitiveType)
Creates GL_ELEMENT_ARRAY_BUFFER object.
static const unsigned int PRIMITIVE_TYPE_LINE_STRIP
Draws lines. Indicates that the indices make up a the th line segment with .
static const unsigned int PRIMITIVE_TYPE_TRIANGLE_FAN
Draws triangles. Indicates that the indices make up the th triangle with .
Specializes IndexBufferBase for particular IndexType.
IndexType Index
Holds the index type maintained by this index buffer object.
IndexBuffer(unsigned int primitiveType)
Creates GL_ELEMENT_ARRAY_BUFFER object.
void copy(const IndexType *indicesPtr, const std::size_t indicesCount)
Copies indicesCount indices referenced by indicesPtr to the maintained index buffer object.
Maps index buffer element types to descriptive constants.