Vulkan implementation of a 2D image resource. More...
#include <VulkanImage.h>
Inherits Raven::Image2D.
Public Member Functions | |
| ILLUMINE_API | VulkanImage2D (const ImageSpecification &spec) |
| Construct a VulkanImage2D with the given specification. | |
| ImageSpecification & | GetSpecification () override |
| Access the current image specification. | |
| const ImageSpecification & | GetSpecification () const override |
| Get immutable reference to the image specification. | |
| void | Resize (const u32 width, const u32 height) |
| Resize the image and recreate underlying Vulkan resources. | |
| u32 | GetWidth () const override |
| Get the width of the image in pixels. | |
| u32 | GetHeight () const override |
| Get the height of the image in pixels. | |
| Crux::uvec2 | GetSize () const override |
| Get image size as 2D vector. | |
| virtual float | GetAspectRatio () const override |
| Compute the aspect ratio (width / height) of the image. | |
| ILLUMINE_API void | Invalidate () override |
| Recreate the Vulkan image and related resources (called on resize). | |
| ILLUMINE_API void | Release () override |
| Release Vulkan resources associated with this image. | |
| VulkanImageInfo & | GetImageInfo () |
| Get Vulkan-specific image handles. | |
| const VulkanImageInfo & | GetImageInfo () const |
| VkImageView | GetLayerImageView (u32 layer) const |
| Get the image view corresponding to a specific layer. | |
| Buffer | GetBuffer () const override |
| Get or set the raw image data buffer. | |
| Buffer & | GetBuffer () override |
| Get a mutable reference to the internal buffer. | |
| void | CreatePerSpecificLayerImageViews (const std::vector< u32 > &layerIndices) |
| Create image views only for specified layers. | |
| ILLUMINE_API void | CreatePerLayerImageViews () override |
| Create image views for all layers. | |
| ILLUMINE_API void | GenerateMips () const |
| Generate mipmaps for the image (if supported). | |
| ILLUMINE_API void | SetData (const void *data, usize size) const override |
| bool | IsDepthFormat () const |
| Public Member Functions inherited from Raven::Image2D | |
| virtual | ~Image2D ()=default |
| Public Member Functions inherited from Raven::RefCounted | |
| RefCounted () | |
| virtual | ~RefCounted () |
| void | IncRefCount () |
| void | DecRefCount () |
| u32 | GetRefCount () const |
Public Attributes | |
| ResourceState | CurrentState = ResourceState::Undefined |
Additional Inherited Members | |
| Static Public Member Functions inherited from Raven::Image2D | |
| static Ref< Image2D > | Create (const ImageSpecification &spec) |
| Factory method to create a concrete Image2D instance. | |
Vulkan implementation of a 2D image resource.
Manages Vulkan image creation, views per layer/mip, resizing, and memory. Inherits from the generic Image2D interface.
| Raven::VulkanImage2D::VulkanImage2D | ( | const ImageSpecification & | spec | ) |
Construct a VulkanImage2D with the given specification.
| spec | Specification describing image dimensions, format, etc. |
|
overridevirtual |
Create image views for all layers.
Implements Raven::Image2D.
| void Raven::VulkanImage2D::CreatePerSpecificLayerImageViews | ( | const std::vector< u32 > & | layerIndices | ) |
Create image views only for specified layers.
| layerIndices | Vector of layer indices for which to create views. |
| void Raven::VulkanImage2D::GenerateMips | ( | ) | const |
Generate mipmaps for the image (if supported).
|
inlineoverridevirtual |
Compute the aspect ratio (width / height) of the image.
Implements Raven::Image2D.
|
inlineoverridevirtual |
Get or set the raw image data buffer.
Implements Raven::Image2D.
|
inlineoverridevirtual |
Get a mutable reference to the internal buffer.
Allows modification of the buffer, e.g., for updates or transfers.
Implements Raven::Image2D.
|
inlineoverridevirtual |
|
inline |
Get Vulkan-specific image handles.
|
inline |
|
inline |
Get the image view corresponding to a specific layer.
| layer | Index of the image layer. |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Get immutable reference to the image specification.
For read-only access to image parameters.
Implements Raven::Image2D.
|
inlineoverridevirtual |
Access the current image specification.
Implements Raven::Image2D.
|
inlineoverridevirtual |
|
overridevirtual |
Recreate the Vulkan image and related resources (called on resize).
Implements Raven::Image2D.
|
inline |
|
overridevirtual |
Release Vulkan resources associated with this image.
Implements Raven::Image2D.
|
inlinevirtual |
Resize the image and recreate underlying Vulkan resources.
| width | New image width. |
| height | New image height. |
Implements Raven::Image2D.
|
overridevirtual |
Implements Raven::Image2D.
| ResourceState Raven::VulkanImage2D::CurrentState = ResourceState::Undefined |