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>
6
#include <
wren/math/vector.hpp
>
7
#include <
wren/utils/errors.hpp
>
8
9
namespace
wren::vk
{
10
11
class
Image
{
12
public
:
13
static
auto
create
(const ::vk::Device& device,
const
VmaAllocator& allocator,
14
const ::vk::Format& format,
const
math::vec2i
& 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
wren::vk::Image
Definition
image.hpp:11
wren::vk::Image::get
auto get() const
Definition
image.hpp:17
wren::vk::Image::create
static auto create(const ::vk::Device &device, const VmaAllocator &allocator, const ::vk::Format &format, const math::vec2i &size, const ::vk::ImageUsageFlags &usage) -> expected< Image >
Definition
image.cpp:5
wren::vk
Definition
render_pass.hpp:19
wren::expected
tl::expected< T, Err > expected
Definition
errors.hpp:49
wren::math::vec2i
Definition
vector.hpp:110
vector.hpp
errors.hpp
wren_vk
include
wren
vk
image.hpp
Generated by
1.10.0