![]() |
Raven Engine v0.1
|
Vulkan-specific 2D texture implementation. More...
#include <VulkanTexture.h>
Public Member Functions | |
| VulkanTexture2D (const TextureSpecification &spec) | |
| Constructs an empty Vulkan texture with the given specification. | |
| VulkanTexture2D (u32 width, u32 height) | |
| Constructs an empty Vulkan texture with given width and height. | |
| VulkanTexture2D (const std::string &path, bool loadUnorm) | |
| Constructs a Vulkan texture by loading from an image file path. | |
| ~VulkanTexture2D () | |
| Destructor releases Vulkan image resources. | |
| 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. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Raven::Texture2D | |
| static Ref< Texture2D > | Create (u32 width, u32 height) |
| Creates a 2D texture with given width and height. | |
| static Ref< Texture2D > | Create (const TextureSpecification &specification) |
| Creates a 2D texture from a TextureSpecification. | |
| static Ref< Texture2D > | Create (const std::string &path, bool loadUnorm=false) |
| Loads a 2D texture from a file path. | |
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 TextureSpecification & | spec | ) |
Constructs an empty Vulkan texture with the given specification.
| spec | Texture parameters such as size and format. |
| 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. |
| Raven::VulkanTexture2D::~VulkanTexture2D | ( | ) |
Destructor releases Vulkan image resources.
|
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.