Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
buffer.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 
11  class Buffer
12  {
13  private:
14  GLuint m_BufferID;
15  GLuint m_ComponentCount;
16  public:
22  Buffer(GLfloat* data, GLsizei count, GLuint componentCount);
23  ~Buffer();
24 
26  void bind() const;
28  void unbind() const;
29 
31  inline GLuint getComponentCount() const { return m_ComponentCount; }
32  };
33 } }
Buffer(GLfloat *data, GLsizei count, GLuint componentCount)
Create and generate VertexBuffer.
Definition: buffer.cpp:7
~Buffer()
Definition: buffer.cpp:16
void unbind() const
Unbind the buffer.
Definition: buffer.cpp:26
Definition: audioclip.cpp:3
void bind() const
Bind the buffer.
Definition: buffer.cpp:21
Creates Vertex Buffers.
Definition: buffer.h:11
GLuint getComponentCount() const
Gets the types of components in the vertex data.
Definition: buffer.h:31