OpenMiner/include/gl/VertexBuffer.hpp

36 lines
902 B
C++
Raw Normal View History

2014-12-18 07:02:48 +01:00
/*
* =====================================================================================
*
* Filename: VertexBuffer.hpp
*
2018-06-05 01:24:54 +02:00
* Description:
2014-12-18 07:02:48 +01:00
*
* Created: 15/12/2014 17:09:58
*
* Author: Quentin Bazin, <quent42340@gmail.com>
2014-12-18 07:02:48 +01:00
*
* =====================================================================================
*/
#ifndef VERTEXBUFFER_HPP_
#define VERTEXBUFFER_HPP_
#include "OpenGL.hpp"
class VertexBuffer {
public:
VertexBuffer();
~VertexBuffer() noexcept;
2018-06-05 01:24:54 +02:00
void setData(GLsizeiptr size, const GLvoid *data, GLenum usage) const;
void updateData(GLintptr offset, GLsizeiptr size, const GLvoid *data) const;
void setAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer) const;
2014-12-18 07:02:48 +01:00
static void bind(const VertexBuffer *vertexBuffer);
2018-06-05 01:24:54 +02:00
2014-12-18 07:02:48 +01:00
private:
GLuint m_id;
};
#endif // VERTEXBUFFER_HPP_