![]() |
Raven Engine v0.1
|
Abstract interface representing a GPU image resource.Defines lifecycle management, resizing, and query functions for images. More...
#include <Image.h>
Public Member Functions | |
| virtual | ~Image2D ()=default |
| virtual ImageSpecification & | GetSpecification ()=0 |
| Get mutable reference to the image specification. | |
| virtual const ImageSpecification & | GetSpecification () const =0 |
| Get immutable reference to the image specification. | |
| virtual void | Resize (const u32 width, const u32 height)=0 |
| Resize the image to new width and height. | |
| virtual u32 | GetWidth () const =0 |
| Get the width of the image in pixels. | |
| virtual u32 | GetHeight () const =0 |
| Get the height of the image in pixels. | |
| virtual Crux::uvec2 | GetSize () const =0 |
| Get image size as 2D vector. | |
| virtual float | GetAspectRatio () const =0 |
| Get the aspect ratio (width/height) of the image. | |
| virtual void | Invalidate ()=0 |
| Invalidate the image resource. | |
| virtual void | Release ()=0 |
| Release the image resource immediately. | |
| virtual void | CreatePerLayerImageViews ()=0 |
| Create per-layer image views. | |
| virtual Buffer | GetBuffer () const =0 |
| Get a copy of the internal buffer abstraction. | |
| virtual Buffer & | GetBuffer ()=0 |
| Get a mutable reference to the internal buffer. | |
Static Public Member Functions | |
| static Ref< Image2D > | Create (const ImageSpecification &spec) |
| Factory method to create a concrete Image2D instance. | |
Abstract interface representing a GPU image resource.
Defines lifecycle management, resizing, and query functions for images.
|
virtualdefault |
|
static |
|
pure virtual |
Create per-layer image views.
Generates Vulkan image views (or API equivalent) for each layer of the image. Important for array textures or layered rendering.
Implemented in Raven::VulkanImage2D.
|
pure virtual |
Get the aspect ratio (width/height) of the image.
Implemented in Raven::VulkanImage2D.
|
pure virtual |
Get a copy of the internal buffer abstraction.
Implemented in Raven::VulkanImage2D.
|
pure virtual |
Get a mutable reference to the internal buffer.
Allows modification of the buffer, e.g., for updates or transfers.
Implemented in Raven::VulkanImage2D.
|
pure virtual |
Get the height of the image in pixels.
Implemented in Raven::VulkanImage2D.
|
pure virtual |
Get image size as 2D vector.
Implemented in Raven::VulkanImage2D.
|
pure virtual |
Get immutable reference to the image specification.
For read-only access to image parameters.
Implemented in Raven::VulkanImage2D.
|
pure virtual |
Get mutable reference to the image specification.
Allows querying and modifying image creation parameters after instantiation.
Implemented in Raven::VulkanImage2D.
|
pure virtual |
|
pure virtual |
Invalidate the image resource.
Signals that the current GPU resource is stale and needs re-creation.
Implemented in Raven::VulkanImage2D.
|
pure virtual |
Release the image resource immediately.
Frees associated GPU resources.
Implemented in Raven::VulkanImage2D.
Resize the image to new width and height.
| width | New image width in pixels. |
| height | New image height in pixels. |
Typically triggers resource re-creation internally.
Implemented in Raven::VulkanImage2D.