Practical Tools for Simple Design
Loading...
Searching...
No Matches
VertexBuffer.hpp
1#ifndef CORE_VERTEX_BUFFER_HPP
2#define CORE_VERTEX_BUFFER_HPP
3
4#include "pch.hpp" // IWYU pragma: export
5
6namespace Core {
11public:
12 VertexBuffer(const std::vector<float> &vertices,
13 unsigned int componentCount);
14 VertexBuffer(const VertexBuffer &) = delete;
16
18
19 VertexBuffer &operator=(const VertexBuffer &) = delete;
20 VertexBuffer &operator=(VertexBuffer &&other);
21
22 unsigned int GetComponentCount() const { return m_ComponentCount; }
23 GLenum GetType() const { return m_Type; }
24
25 void Bind() const;
26 void Unbind() const;
27
28private:
29 GLuint m_BufferId;
30
31 unsigned int m_ComponentCount;
32 GLenum m_Type = GL_FLOAT;
33};
34} // namespace Core
35#endif
Wrapper for OpenGL Vertex Buffer Object (a.k.a GL_ARRAY_BUFFER)
Definition: VertexBuffer.hpp:10
Core functionality of the framework
Definition: config.hpp:7