OpenMiner/include/gl/VertexBuffer.hpp

38 lines
853 B
C++
Raw Normal View History

2014-12-18 07:02:48 +01:00
/*
* =====================================================================================
*
* Filename: VertexBuffer.hpp
*
* Description:
*
* Version: 1.0
* Created: 15/12/2014 17:09:58
* Revision: none
* Compiler: gcc
*
* Author: Quentin BAZIN, <quent42340@gmail.com>
* Company:
*
* =====================================================================================
*/
#ifndef VERTEXBUFFER_HPP_
#define VERTEXBUFFER_HPP_
#include "OpenGL.hpp"
class VertexBuffer {
public:
VertexBuffer();
~VertexBuffer();
void setData(GLsizeiptr size, const GLvoid *data, GLenum usage);
void updateData(GLintptr offset, GLsizeiptr size, const GLvoid *data);
static void bind(const VertexBuffer *vertexBuffer);
private:
GLuint m_id;
};
#endif // VERTEXBUFFER_HPP_