wren
Vulkan-based game engine
Loading...
Searching...
No Matches
image.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <vk_mem_alloc.h>
4
5#include <vulkan/vulkan.hpp>
8
9namespace wren::vk {
10
11class Image {
12 public:
13 static auto create(const ::vk::Device& device, const VmaAllocator& allocator,
14 const ::vk::Format& format, const math::Vec2f& size,
15 const ::vk::ImageUsageFlags& usage) -> expected<Image>;
16
17 [[nodiscard]] auto get() const { return image_; }
18
19 private:
20 VmaAllocation alloc_{};
21 ::vk::Image image_;
22};
23
24} // namespace wren::vk
Definition image.hpp:11
auto get() const
Definition image.hpp:17
VmaAllocation alloc_
Definition image.hpp:20
::vk::Image image_
Definition image.hpp:21
static auto create(const ::vk::Device &device, const VmaAllocator &allocator, const ::vk::Format &format, const math::Vec2f &size, const ::vk::ImageUsageFlags &usage) -> expected< Image >
Definition image.cpp:5
Definition render_pass.hpp:19
std::expected< T, Err > expected
Definition result.hpp:49
Definition vector.hpp:124