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