sandbox
Loading...
Searching...
No Matches
cube_image.hpp
1#ifndef LIBSBX_GRAPHICS_IMAGES_CUBE_IMAGE_HPP_
2#define LIBSBX_GRAPHICS_IMAGES_CUBE_IMAGE_HPP_
3
4#include <filesystem>
5
6#include <libsbx/utility/timer.hpp>
7
8#include <libsbx/graphics/images/image.hpp>
9
10#include <libsbx/graphics/buffers/buffer.hpp>
11
12#include <libsbx/graphics/resource_storage.hpp>
13
14namespace sbx::graphics {
15
16class cube_image : public image {
17
18public:
19
20 cube_image(const std::filesystem::path& path, const std::string& suffix = ".png", VkFilter filter = VK_FILTER_LINEAR, VkSamplerAddressMode address_mode = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, bool anisotropic = true, bool mipmap = true);
21
22 ~cube_image() override;
23
24private:
25
26 auto _load() -> void;
27
28 inline static constexpr auto side_names = std::array<std::string_view, 6u>{"right", "left", "top", "bottom", "front", "back"};
29
30 bool _anisotropic;
31 bool _mipmap;
32 std::uint8_t _channels;
33 std::filesystem::path _file_path;
34 std::string _file_suffix;
35
36}; // class cube_image
37
39
40} // namespace sbx::graphics
41
42#endif // LIBSBX_GRAPHICS_IMAGES_CUBE_IMAGE_HPP_
Definition: cube_image.hpp:16
Definition: image.hpp:20
Definition: resource_storage.hpp:17