25 #ifndef __glfElementBuffer_hh__
26 #define __glfElementBuffer_hh__
28 #include "glfCommon.hh"
55 void Create(
int numIndices, GLenum type, GLenum mode,
const void* indices);
61 void Create(
const std::vector<unsigned char>& indices, GLenum mode) {
62 Create((
int)indices.size(), GL_UNSIGNED_BYTE, mode, &indices[0]);
69 void Create(
const std::vector<unsigned short>& indices, GLenum mode) {
70 Create((
int)indices.size(), GL_UNSIGNED_SHORT, mode, &indices[0]);
77 void Create(
const std::vector<unsigned int>& indices, GLenum mode) {
78 Create((
int)indices.size(), GL_UNSIGNED_INT, mode, &indices[0]);
96 void Draw(
int first = 0,
int count = -1)
const;
106 std::vector<GLubyte> array_;
123 #endif // __glfElementBuffer_hh__
An element buffer contains vertex indices that form primitives.
void Create(const std::vector< unsigned short > &indices, GLenum mode)
Secure convenience wrapper for glfElementBuffer::Create method with type = GL_UNSIGNED_SHORT.
void Create(const std::vector< unsigned int > &indices, GLenum mode)
Secure convenience wrapper for glfElementBuffer::Create method with type = GL_UNSIGNED_INT;.
void Create(const std::vector< unsigned char > &indices, GLenum mode)
Secure convenience wrapper for glfElementBuffer::Create method with type = GL_UNSIGNED_BYTE.