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

WebGPU implementation of RawBuffer. More...

#include <WebGPUBufferAllocator.hpp>

Inheritance diagram for Video::WebGPURawBuffer:
Video::RawBuffer

Public Member Functions

 WebGPURawBuffer (WebGPURenderer &webGPURenderer, Buffer::BufferUsage bufferUsage, bool temporary, unsigned int size)
 Create new raw buffer used to satisfy allocations. More...
 
 ~WebGPURawBuffer () final
 Destructor. More...
 
void Write (uint32_t offset, uint32_t size, const void *data) final
 Write data to buffer. More...
 
WGPUBuffer GetBuffer () const
 Get the internal WebGPU buffer. More...
 
- Public Member Functions inherited from Video::RawBuffer
virtual ~RawBuffer ()
 Destructor. More...
 

Detailed Description

WebGPU implementation of RawBuffer.

Constructor & Destructor Documentation

◆ WebGPURawBuffer()

Video::WebGPURawBuffer::WebGPURawBuffer ( WebGPURenderer webGPURenderer,
Buffer::BufferUsage  bufferUsage,
bool  temporary,
unsigned int  size 
)

Create new raw buffer used to satisfy allocations.

Parameters
webGPURendererThe WebGPU renderer.
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.

◆ ~WebGPURawBuffer()

Video::WebGPURawBuffer::~WebGPURawBuffer ( )
final

Destructor.

Member Function Documentation

◆ GetBuffer()

WGPUBuffer Video::WebGPURawBuffer::GetBuffer ( ) const

Get the internal WebGPU buffer.

Returns
The internal WebGPU buffer.

◆ Write()

void Video::WebGPURawBuffer::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.
Todo:
Could use mapOnCreate for non-temporary buffers?

Implements Video::RawBuffer.


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