ngfx::MTLBuffer
Inherits from ngfx::Buffer
Public Functions
Name | |
---|---|
void | create(MTLGraphicsContext * ctx, const void * data, uint32_t size, MTLResourceOptions resourceOptions) |
virtual | ~MTLBuffer() |
virtual void * | map() override |
virtual void | unmap() override |
virtual void | upload(const void * data, uint32_t size, uint32_t offset =0) override |
virtual void | download(void * data, uint32_t size, uint32_t offset =0) override |
Public Attributes
Name | |
---|---|
id< MTLBuffer > | v |
Additional inherited members
Public Functions inherited from ngfx::Buffer
Name | |
---|---|
virtual | ~Buffer() |
Public Functions Documentation
function create
void create(
MTLGraphicsContext * ctx,
const void * data,
uint32_t size,
MTLResourceOptions resourceOptions
)
function ~MTLBuffer
inline virtual ~MTLBuffer()
function map
virtual void * map() override
Reimplements: ngfx::Buffer::map
Map the buffer contents for CPU read/write access
function unmap
virtual void unmap() override
Reimplements: ngfx::Buffer::unmap
Unmap the buffer
function upload
virtual void upload(
const void * data,
uint32_t size,
uint32_t offset =0
) override
Parameters:
- data The buffer data
- size The size of the data (in bytes)
- offset The destination offset (in bytes)
Reimplements: ngfx::Buffer::upload
Upload the CPU data to the GPU buffer
function download
virtual void download(
void * data,
uint32_t size,
uint32_t offset =0
) override
Parameters:
- data The destination address
- size The size of the data to download (in bytes)
- offset The destination offset (in bytes)
Reimplements: ngfx::Buffer::download
Download the GPU data to CPU-accessible memory
Public Attributes Documentation
variable v
id< MTLBuffer > v;
Updated on 3 April 2021 at 20:21:51 PDT