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
24 auto name() const noexcept -> std::string override {
25 return "Cube Image";
26 }
27
28private:
29
30 auto _load(const std::filesystem::path& path, const std::string& suffix) -> void;
31
32 inline static constexpr auto side_names = std::array<std::string_view, 6u>{"right", "left", "top", "bottom", "front", "back"};
33
34 bool _anisotropic;
35 bool _mipmap;
36 std::uint8_t _channels;
37
38}; // class cube_image
39
41
42} // namespace sbx::graphics
43
44#endif // LIBSBX_GRAPHICS_IMAGES_CUBE_IMAGE_HPP_
Definition: cube_image.hpp:16
Definition: image.hpp:20
Definition: resource_storage.hpp:17