sandbox
Loading...
Searching...
No Matches
allocator.hpp
1#ifndef LIBSBX_GRAPHICS_DEVICES_ALLOCATOR_HPP_
2#define LIBSBX_GRAPHICS_DEVICES_ALLOCATOR_HPP_
3
4#include <vk_mem_alloc.h>
5
6#include <libsbx/graphics/devices/instance.hpp>
7#include <libsbx/graphics/devices/physical_device.hpp>
8#include <libsbx/graphics/devices/logical_device.hpp>
9
10namespace sbx::graphics {
11
12class allocator {
13
14public:
15
16 using handle_type = VmaAllocator;
17
19
20 allocator(const allocator& other) = delete;
21
22 allocator(allocator&& other) = delete;
23
24 ~allocator();
25
26 auto operator=(const allocator& other) -> allocator& = delete;
27
28 auto operator=(allocator&& other) -> allocator& = delete;
29
30 auto handle() const -> handle_type;
31
32 operator handle_type() const noexcept {
33 return handle();
34 }
35
36private:
37
38 handle_type _handle;
39
40}; // class allocator
41
42}; // namespace sbx::graphics
43
44#endif // LIBSBX_GRAPHICS_DEVICES_ALLOCATOR_HPP_
Definition: allocator.hpp:12
Definition: instance.hpp:10
Definition: logical_device.hpp:60
Definition: physical_device.hpp:16