1#ifndef LIBSBX_GRAPHICS_IMAGES_IMAGE2D_HPP_
2#define LIBSBX_GRAPHICS_IMAGES_IMAGE2D_HPP_
6#include <libsbx/memory/observer_ptr.hpp>
8#include <libsbx/math/vector2.hpp>
11#include <libsbx/graphics/images/image.hpp>
13namespace sbx::graphics {
19 image2d(
const math::vector2u& extent, VkFormat format = VK_FORMAT_R8G8B8A8_UNORM, VkImageLayout layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VkImageUsageFlags usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_STORAGE_BIT, VkFilter filter = VK_FILTER_LINEAR, VkSamplerAddressMode address_mode = VK_SAMPLER_ADDRESS_MODE_REPEAT, VkSampleCountFlagBits samples = VK_SAMPLE_COUNT_1_BIT,
bool anisotropic =
false,
bool mipmap =
false);
21 image2d(
const std::filesystem::path& path, VkFilter filter = VK_FILTER_LINEAR, VkSamplerAddressMode address_mode = VK_SAMPLER_ADDRESS_MODE_REPEAT,
bool anisotropic =
false,
bool mipmap =
false);
35 std::uint8_t _channels;
36 std::filesystem::path _path;
Definition: image2d.hpp:15
A vector in two-dimensional space.
Definition: vector2.hpp:27
A non-owning pointer that can be used to observe the value of a pointer.
Definition: observer_ptr.hpp:27