libdonut  2.3.2
Application framework for cross-platform game development in C++20
Buffer.hpp
Go to the documentation of this file.
1 #ifndef DONUT_GRAPHICS_BUFFER_HPP
2 #define DONUT_GRAPHICS_BUFFER_HPP
3 
4 #include <donut/UniqueHandle.hpp>
6 
7 namespace donut::graphics {
8 
12 class Buffer {
13 public:
19  Buffer();
20 
31  [[nodiscard]] Handle get() const noexcept {
32  return buffer.get();
33  }
34 
35 private:
36  struct BufferDeleter {
37  void operator()(Handle handle) const noexcept;
38  };
39 
41 };
42 
43 } // namespace donut::graphics
44 
45 #endif
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