qxLib
Public Member Functions | Protected Member Functions | List of all members
qx::buffer_base Class Referenceabstract

Base OpenGL buffer object class. More...

#include <buffer_base.h>

Inheritance diagram for qx::buffer_base:
qx::IBuffer qx::base_ebo qx::base_vbo qx::buffer_binding_point_base qx::base_ssbo qx::base_ubo

Public Member Functions

virtual QX_DECL_IBUFFER void MemBarrier ()
 Defines a barrier ordering memory transactions.
 
virtual void Allocate (GLsizeiptr nSize, const void *pData=nullptr, GLenum eUsage=GL_DYNAMIC_DRAW)
 Allocate memory for the buffer. More...
 
virtual void Update (const void *pData, GLsizeiptr nSize, GLintptr nOffset=0)
 Update buffer. More...
 
- Public Member Functions inherited from qx::IBuffer
virtual void Generate ()=0
 Generate buffer object.
 
virtual void Bind () const =0
 Bind a named buffer object.
 
virtual void Unbind () const =0
 Unbind a named buffer object.
 
virtual GLuint GetBufferName () const =0
 Get the object's name - the reference to the object. More...
 
virtual bool IsGenerated () const =0
 Is this buffer generated. More...
 

Protected Member Functions

virtual GLenum GetBufferType () const =0
 Get buffer type. More...
 
virtual GLbitfield GetBarrierBit () const =0
 Get buffer type barrier bit. More...
 

Detailed Description

Base OpenGL buffer object class.

~

Author
Khrapov
Date
10.07.2020

Definition at line 26 of file buffer_base.h.

Member Function Documentation

◆ Allocate()

void qx::buffer_base::Allocate ( GLsizeiptr  nSize,
const void *  pData = nullptr,
GLenum  eUsage = GL_DYNAMIC_DRAW 
)
inlinevirtual

Allocate memory for the buffer.

Parameters
nSize- data size
pData- data pointer
eUsage- the expected usage pattern of the data store

Definition at line 52 of file buffer_base.inl.

◆ GetBarrierBit()

virtual GLbitfield qx::buffer_base::GetBarrierBit ( ) const
protectedpure virtual

Get buffer type barrier bit.

Return values
-buffer type barrier bit

◆ GetBufferType()

virtual GLenum qx::buffer_base::GetBufferType ( ) const
protectedpure virtual

Get buffer type.

Return values
-buffer type

◆ Update()

void qx::buffer_base::Update ( const void *  pData,
GLsizeiptr  nSize,
GLintptr  nOffset = 0 
)
inlinevirtual

Update buffer.

Parameters
pData- data pointer
nSize- data size
nOffset- offset from the buffer beginning

Definition at line 57 of file buffer_base.inl.


The documentation for this class was generated from the following files: