libdonut 2.3.6
Application framework for cross-platform game development in C++20
Loading...
Searching...
No Matches
Buffer.hpp
Go to the documentation of this file.
1#ifndef DONUT_GRAPHICS_BUFFER_HPP
2#define DONUT_GRAPHICS_BUFFER_HPP
3
6
7namespace donut::graphics {
8
12class Buffer {
13public:
20
31 [[nodiscard]] Handle get() const noexcept {
32 return buffer.get();
33 }
34
35private:
36 struct BufferDeleter {
37 void operator()(Handle handle) const noexcept;
38 };
39
41};
42
43} // namespace donut::graphics
44
45#endif
Generic nullable RAII resource handle with exclusive ownership of a resource that is automatically de...
Definition UniqueHandle.hpp:21
constexpr Handle get() const noexcept
Get the value of the underlying resource handle.
Definition UniqueHandle.hpp:152
Unique resource handle with exclusive ownership of a GPU memory buffer.
Definition Buffer.hpp:12
Handle get() const noexcept
Get an opaque handle to the GPU representation of the buffer.
Definition Buffer.hpp:31
Buffer()
Create a new empty GPU memory buffer resource.
Definition Buffer.hpp:7
std::uint32_t Handle
Generic GPU resource handle.
Definition Handle.hpp:11