12 #ifndef INDEXBUFFER_H_6014714286 13 #define INDEXBUFFER_H_6014714286 15 #include <Carna/Carna.h> 52 void copy(
const void* bufferPtr, std::size_t bufferSize, std::size_t indicesCount );
137 template<
typename IndexType >
140 static_assert(
sizeof( IndexType ) < 0,
"Unknown index type." );
153 operator unsigned int()
169 operator unsigned int()
185 operator unsigned int()
203 template<
typename IndexType >
227 void copy(
const IndexType* indicesPtr,
const std::size_t indicesCount );
232 template<
typename IndexType >
239 template<
typename IndexType >
251 #endif // INDEXBUFFER_H_6014714286 void copy(const IndexType *indicesPtr, const std::size_t indicesCount)
Copies indicesCount indices referenced by indicesPtr to the maintained index buffer object...
static const unsigned int PRIMITIVE_TYPE_TRIANGLE_STRIP
Draws triangles. Indicates that the indices make up the th triangle with .
Maps index buffer element types to descriptive constants.
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 PRIMITIVE_TYPE_POINTS
Draws points. Indicates that each index makes up a single point.
static const unsigned int TYPE_UINT_16
Indicates uint16_t element type.
IndexType Index
Holds the index type maintained by this index buffer object.
Defines Carna::base::BaseBuffer.
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_TRIANGLE_FAN
Draws triangles. Indicates that the indices make up the th triangle with .
static const unsigned int TYPE_UINT_8
Indicates uint8_t element type.
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 TYPE_UINT_32
Indicates uint32_t element type.
IndexBuffer(unsigned int primitiveType)
Creates GL_ELEMENT_ARRAY_BUFFER object.
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...
Specializes IndexBufferBase for particular IndexType.
Implements OpenGL buffer objects maintenance RAII base class.
static const unsigned int PRIMITIVE_TYPE_LINES
Draws lines. Indicates that the indices make up the th line segment with .
Maintains GL_ELEMENT_ARRAY_BUFFER object that holds the vertex indices, that interconnect the vertice...