|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
Owns Vulkan resources for a sampled cubemap texture. More...
#include <CubemapTexture.h>
Public Member Functions | |
| CubemapTexture ()=default | |
| Creates an empty cubemap texture with no Vulkan resources. | |
| CubemapTexture (CubemapTextureData data, Core::ApplicationContext *context) | |
| Creates a cubemap texture from CPU data and an application context. | |
| ~CubemapTexture () | |
| Releases owned Vulkan resources. | |
| CubemapTexture (const CubemapTexture &)=delete | |
| Copy construction is disabled because Vulkan image handles are uniquely owned. | |
| CubemapTexture & | operator= (const CubemapTexture &)=delete |
| Copy assignment is disabled because Vulkan image handles are uniquely owned. | |
| CubemapTexture (CubemapTexture &&other) noexcept | |
| Move-constructs a cubemap texture and transfers Vulkan handles. | |
| CubemapTexture & | operator= (CubemapTexture &&other) noexcept |
| Move-assigns a cubemap texture and transfers Vulkan handles. | |
| void | createResourcesAndUpload (VkCommandPool commandPool, VkQueue queue) |
| Creates Vulkan resources and uploads all cubemap faces. | |
| void | cleanup () |
| Releases the Vulkan image, image memory, and image view. | |
| VkDescriptorImageInfo | getDescriptorInfo () const |
| Gets descriptor data for shader sampling. | |
| bool | isValid () const |
| Checks whether the texture has sampling resources. | |
Private Member Functions | |
| void | resetHandles () |
Private Attributes | |
| CubemapTextureData | data_ {} |
| Core::ApplicationContext * | context_ = nullptr |
| VkImage | image_ = VK_NULL_HANDLE |
| VkDeviceMemory | memory_ = VK_NULL_HANDLE |
| VkImageView | imageView_ = VK_NULL_HANDLE |
| VkSampler | sampler_ = VK_NULL_HANDLE |
Owns Vulkan resources for a sampled cubemap texture.
CubemapTexture uploads CubemapTextureData into a cube-compatible Vulkan image, creates a cube image view, and gets a clamp-to-edge sampler from the application sampler cache. The texture owns the image, memory, and image view. It does not own the ApplicationContext.
Definition at line 71 of file CubemapTexture.h.
|
default |
Creates an empty cubemap texture with no Vulkan resources.
Referenced by CubemapTexture(), CubemapTexture(), operator=(), and operator=().
| Engine::Assets::CubemapTexture::CubemapTexture | ( | CubemapTextureData | data, |
| Core::ApplicationContext * | context ) |
Creates a cubemap texture from CPU data and an application context.
| data | CPU-side cubemap data to upload later. |
| context | Application context used for Vulkan device access. Must outlive this texture. |
| Engine::Assets::CubemapTexture::~CubemapTexture | ( | ) |
Releases owned Vulkan resources.
|
delete |
Copy construction is disabled because Vulkan image handles are uniquely owned.
References CubemapTexture().
|
noexcept |
Move-constructs a cubemap texture and transfers Vulkan handles.
| other | Texture to move from. |
References CubemapTexture().
| void Engine::Assets::CubemapTexture::cleanup | ( | ) |
Releases the Vulkan image, image memory, and image view.
| void Engine::Assets::CubemapTexture::createResourcesAndUpload | ( | VkCommandPool | commandPool, |
| VkQueue | queue ) |
Creates Vulkan resources and uploads all cubemap faces.
| commandPool | Command pool used for the one-time upload command buffer. |
| queue | Queue used to submit the upload command buffer. |
| std::runtime_error | When the context or image data is missing, or Vulkan resource creation fails. |
|
nodiscard |
Gets descriptor data for shader sampling.
|
inlinenodiscard |
Checks whether the texture has sampling resources.
Definition at line 137 of file CubemapTexture.h.
References imageView_, and sampler_.
|
delete |
Copy assignment is disabled because Vulkan image handles are uniquely owned.
References CubemapTexture().
|
noexcept |
Move-assigns a cubemap texture and transfers Vulkan handles.
| other | Texture to move from. |
References CubemapTexture().
|
private |
|
private |
Definition at line 141 of file CubemapTexture.h.
|
private |
Definition at line 140 of file CubemapTexture.h.
|
private |
Definition at line 142 of file CubemapTexture.h.
|
private |
Definition at line 144 of file CubemapTexture.h.
Referenced by isValid().
|
private |
Definition at line 143 of file CubemapTexture.h.
|
private |
Definition at line 145 of file CubemapTexture.h.
Referenced by isValid().