25 lines
495 B
C++
25 lines
495 B
C++
#ifndef GLBUFFER_H
|
|
#define GLBUFFER_H
|
|
|
|
#include "gl3w.h"
|
|
#include "jes.h"
|
|
|
|
namespace jes
|
|
{
|
|
class GLBuffer
|
|
{
|
|
public:
|
|
GLBuffer();
|
|
~GLBuffer();
|
|
bool create(GLenum target, GLenum usage, const void *ptr, size_t sz);
|
|
GLuint get_id() { return m_id; }
|
|
void bind() { glBindBuffer(m_target, m_id); }
|
|
protected:
|
|
GLuint m_id;
|
|
GLenum m_target;
|
|
};
|
|
typedef Ref<GLBuffer> GLBufferRef;
|
|
}
|
|
|
|
#endif
|