13 inline buffer_base::~buffer_base()
15 if (m_nBuffer != std::numeric_limits<GLuint>::max())
17 glDeleteBuffers(1, &m_nBuffer);
18 m_nBuffer = std::numeric_limits<GLuint>::max();
24 glGenBuffers(1, &m_nBuffer);
44 return m_nBuffer != std::numeric_limits<GLuint>::max();
virtual void Bind() const =0
Bind a named buffer object.
virtual void Generate()=0
Generate buffer object.
virtual bool IsGenerated() const =0
Is this buffer generated.
virtual GLuint GetBufferName() const =0
Get the object's name - the reference to the object.
virtual void Unbind() const =0
Unbind a named buffer object.
virtual GLenum GetBufferType() const =0
Get buffer type.
virtual GLbitfield GetBarrierBit() const =0
Get buffer type barrier bit.
virtual void Allocate(GLsizeiptr nSize, const void *pData=nullptr, GLenum eUsage=GL_DYNAMIC_DRAW)
Allocate memory for the buffer.
virtual QX_DECL_IBUFFER void MemBarrier()
Defines a barrier ordering memory transactions.
virtual void Update(const void *pData, GLsizeiptr nSize, GLintptr nOffset=0)
Update buffer.