Loads cubemap face images from a directory.
CubemapTextureData loadFromDirectory(const std::filesystem::path &directory) const
Loads six cubemap faces from a directory.
CubemapTexture(CubemapTexture &&other) noexcept
Move-constructs a cubemap texture and transfers Vulkan handles.
~CubemapTexture()
Releases owned Vulkan resources.
void cleanup()
Releases the Vulkan image, image memory, and image view.
CubemapTexture & operator=(CubemapTexture &&other) noexcept
Move-assigns a cubemap texture and transfers Vulkan handles.
Core::ApplicationContext * context_
bool isValid() const
Checks whether the texture has sampling resources.
void createResourcesAndUpload(VkCommandPool commandPool, VkQueue queue)
Creates Vulkan resources and uploads all cubemap faces.
CubemapTexture & operator=(const CubemapTexture &)=delete
CubemapTexture(CubemapTextureData data, Core::ApplicationContext *context)
Creates a cubemap texture from CPU data and an application context.
VkDescriptorImageInfo getDescriptorInfo() const
Gets descriptor data for shader sampling.
CubemapTexture()=default
Creates an empty cubemap texture with no Vulkan resources.
CubemapTexture(const CubemapTexture &)=delete
The application context is the core class which stores the basic openxr and vulkan objects.
CPU-side RGBA cubemap image data.
uint32_t height
Height in pixels for every face.
std::string uri
Source path or URI used to load this cubemap.
std::array< std::vector< uint8_t >, 6 > faces
RGBA8 pixel data for the six cubemap faces.
uint32_t width
Width in pixels for every face.