Luna::RHI::IBuffer
Represents one buffer resource that can be used to contain arbitrary binary data.
interface Luna::RHI::IBuffer : public virtual IResource
Base type
Member functions
-
virtual BufferDesc get_desc()=0
Gets the descriptor of this buffer object.
-
virtual RV map(usize read_begin, usize read_end, void **data)=0
Maps the resource data to system memory and enables CPU access to the resource data. Map/unmap operations are reference counted, for each
map
operation, you need to callunmap
once to finally unmap the memory. -
virtual void unmap(usize write_begin, usize write_end)=0
Invalidates the pointer to the mapped data, and synchronizes changed data with device when needed. Map/unmap operations are reference counted, for each
map
operation, you need to callunmap
once to finally unmap the memory.