Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
AeonGames::Buffer Class Referenceabstract

Abstract interface for GPU/memory buffer operations. More...

#include <aeongames/Buffer.hpp>

Inheritance diagram for AeonGames::Buffer:
Inheritance graph
Collaboration diagram for AeonGames::Buffer:
Collaboration graph

Public Member Functions

virtual void WriteMemory (size_t aOffset, size_t aSize, const void *aData=nullptr) const =0
 Write data into the buffer at a given offset.
virtual void * Map (size_t aOffset, size_t aSize) const =0
 Map a region of the buffer into CPU-accessible memory.
virtual void Unmap () const =0
 Unmap a previously mapped buffer region.
virtual size_t GetSize () const =0
 Get the total size of the buffer in bytes.

Detailed Description

Abstract interface for GPU/memory buffer operations.

Definition at line 23 of file Buffer.hpp.

Member Function Documentation

◆ GetSize()

virtual size_t AeonGames::Buffer::GetSize ( ) const
pure virtual

Get the total size of the buffer in bytes.

Returns
Buffer size in bytes.

Implemented in AeonGames::OpenGLBuffer, and AeonGames::VulkanBuffer.

◆ Map()

virtual void * AeonGames::Buffer::Map ( size_t aOffset,
size_t aSize ) const
pure virtual

Map a region of the buffer into CPU-accessible memory.

Parameters
aOffsetByte offset of the region to map.
aSizeNumber of bytes to map.
Returns
Pointer to the mapped memory region.

Implemented in AeonGames::OpenGLBuffer, and AeonGames::VulkanBuffer.

◆ Unmap()

virtual void AeonGames::Buffer::Unmap ( ) const
pure virtual

Unmap a previously mapped buffer region.

Implemented in AeonGames::OpenGLBuffer, and AeonGames::VulkanBuffer.

◆ WriteMemory()

virtual void AeonGames::Buffer::WriteMemory ( size_t aOffset,
size_t aSize,
const void * aData = nullptr ) const
pure virtual

Write data into the buffer at a given offset.

Parameters
aOffsetByte offset into the buffer to begin writing.
aSizeNumber of bytes to write.
aDataPointer to the source data, or nullptr to clear.

Implemented in AeonGames::OpenGLBuffer, and AeonGames::VulkanBuffer.


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