Vulkan-specific 2D texture implementation. More...
#include <VulkanTexture.h>
Inherits Raven::Texture2D.
Public Member Functions | |
| ILLUMINE_API | VulkanTexture2D (const std::string &path, bool loadUnorm) |
| Constructs a Vulkan texture by loading from an image file path. | |
| ILLUMINE_API void | Release () override |
| Release Memory for both texture and the underlying image. | |
| u32 | GetWidth () const override |
| Retrieves the width of the texture in pixels. | |
| u32 | GetHeight () const override |
| Retrieves the height of the texture in pixels. | |
| TextureSpecification & | GetSpecification () override |
| Accesses the texture's specification. | |
| const TextureSpecification & | GetSpecification () const override |
| Accesses the texture's specification (const version). | |
| const std::string & | GetPath () const override |
| Retrieves the original file path the texture was loaded from. | |
| Ref< Image2D > | GetImage () const override |
| Retrieves the underlying Image2D resource. | |
| Public Member Functions inherited from Raven::Texture | |
| virtual | ~Texture ()=default |
| Virtual destructor. | |
| Public Member Functions inherited from Raven::RefCounted | |
| RefCounted () | |
| virtual | ~RefCounted () |
| void | IncRefCount () |
| void | DecRefCount () |
| u32 | GetRefCount () const |
Additional Inherited Members | |
| Static Public Member Functions inherited from Raven::Texture2D | |
| static Ref< Texture2D > | Create (const std::string &path, bool loadUnorm=false) |
| Loads a 2D texture from a file path. | |
| Static Public Attributes inherited from Raven::Texture2D | |
| static constexpr AssetType | ASSET_TYPE = AssetType::Texture |
Vulkan-specific 2D texture implementation.
Handles Vulkan image creation and staging buffer setup for texture data. Provides access to texture metadata and underlying image object.
| Raven::VulkanTexture2D::VulkanTexture2D | ( | const std::string & | path, |
| bool | loadUnorm ) |
Constructs a Vulkan texture by loading from an image file path.
Loads texture data into a staging buffer, transfers to GPU image, and generates mipmaps.
| path | Filesystem path to the texture image. |
| loadUnorm | Load a Texture in RGBA8_UNORM colorspace instead of RGBA8_SRGB. Useful for Normals. |
|
inlineoverridevirtual |
Retrieves the height of the texture in pixels.
Implements Raven::Texture.
Retrieves the underlying Image2D resource.
Implements Raven::Texture.
|
inlineoverridevirtual |
Retrieves the original file path the texture was loaded from.
Implements Raven::Texture.
|
inlineoverridevirtual |
Accesses the texture's specification (const version).
Implements Raven::Texture.
|
inlineoverridevirtual |
Accesses the texture's specification.
Implements Raven::Texture.
|
inlineoverridevirtual |
Retrieves the width of the texture in pixels.
Implements Raven::Texture.
|
overridevirtual |
Release Memory for both texture and the underlying image.
Implements Raven::Texture.