Hymn to Beauty
C++ 3D Engine
Video::OpenGLRawBuffer Class Reference

OpenGL implementation of RawBuffer. More...

#include <OpenGLBufferAllocator.hpp>

Inheritance diagram for Video::OpenGLRawBuffer:
Video::RawBuffer

Public Member Functions

 OpenGLRawBuffer (Buffer::BufferUsage bufferUsage, bool temporary, unsigned int size)
 Create new raw buffer used to satisfy allocations. More...
 
 ~OpenGLRawBuffer () final
 Destructor. More...
 
void Write (uint32_t offset, uint32_t size, const void *data) final
 Write data to buffer. More...
 
GLuint GetBufferID () const
 Get the buffer OpenGL ID. More...
 
GLenum GetTarget () const
 Get the OpenGL target. More...
 
- Public Member Functions inherited from Video::RawBuffer
virtual ~RawBuffer ()
 Destructor. More...
 

Detailed Description

OpenGL implementation of RawBuffer.

Constructor & Destructor Documentation

◆ OpenGLRawBuffer()

Video::OpenGLRawBuffer::OpenGLRawBuffer ( Buffer::BufferUsage  bufferUsage,
bool  temporary,
unsigned int  size 
)

Create new raw buffer used to satisfy allocations.

Parameters
bufferUsageHow the buffer will be used.
temporaryWhether the buffer is going to be used to satisfy temporary allocations.
sizeThe size of the buffer in bytes.

◆ ~OpenGLRawBuffer()

Video::OpenGLRawBuffer::~OpenGLRawBuffer ( )
final

Destructor.

Member Function Documentation

◆ GetBufferID()

GLuint Video::OpenGLRawBuffer::GetBufferID ( ) const

Get the buffer OpenGL ID.

Returns
ID to use with OpenGL commands.

◆ GetTarget()

GLenum Video::OpenGLRawBuffer::GetTarget ( ) const

Get the OpenGL target.

Returns
The target to which the buffer is bound.

◆ Write()

void Video::OpenGLRawBuffer::Write ( uint32_t  offset,
uint32_t  size,
const void *  data 
)
finalvirtual

Write data to buffer.

Parameters
offsetThe offset (in bytes) into the buffer to write at.
sizeThe size of the data to write (in bytes).
dataThe data to write.

Implements Video::RawBuffer.


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