Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
indexbuffer.h
Go to the documentation of this file.
1 #pragma once
2 
3 // GLEW
4 #include <GL/glew.h>
5 
6 #include <src/utils/glassert.h>
7 
8 namespace fireworks { namespace graphics {
9 
12  {
13  private:
14  GLuint m_BufferID;
15  GLuint m_Count;
16  public:
21  IndexBuffer(GLushort* data, GLsizei count);
22  ~IndexBuffer();
23 
25  void bind() const;
27  void unbind() const;
28 
30  inline GLuint getCount() const { return m_Count; }
32  inline GLuint getBuffer() const { return m_BufferID; }
33  };
34 
35 } }
void bind() const
Bind the index buffer.
Definition: indexbuffer.cpp:21
Creates Index Buffers.
Definition: indexbuffer.h:11
GLuint getBuffer() const
Gets the index buffer gl instance.
Definition: indexbuffer.h:32
Definition: audioclip.cpp:3
IndexBuffer(GLushort *data, GLsizei count)
Generate Index buffer.
Definition: indexbuffer.cpp:6
GLuint getCount() const
Gets the indices count.
Definition: indexbuffer.h:30
~IndexBuffer()
Definition: indexbuffer.cpp:16
void unbind() const
Unbind the index buffer.
Definition: indexbuffer.cpp:26