Factory and concrete interface for 2D textures. More...
#include <Texture.h>
Inherits Raven::Texture.
Inherited by Raven::VulkanTexture2D.
Static Public Member Functions | |
| static Ref< Texture2D > | Create (const std::string &path, bool loadUnorm=false) |
| Loads a 2D texture from a file path. | |
Static Public Attributes | |
| static constexpr AssetType | ASSET_TYPE = AssetType::Texture |
Additional Inherited Members | |
| Public Member Functions inherited from Raven::Texture | |
| virtual | ~Texture ()=default |
| Virtual destructor. | |
| virtual void | Release ()=0 |
| Release Memory for both texture and the underlying image. | |
| virtual TextureSpecification & | GetSpecification ()=0 |
| Accesses the texture's specification. | |
| virtual const TextureSpecification & | GetSpecification () const =0 |
| Accesses the texture's specification (const version). | |
| virtual u32 | GetWidth () const =0 |
| Retrieves the width of the texture in pixels. | |
| virtual u32 | GetHeight () const =0 |
| Retrieves the height of the texture in pixels. | |
| virtual const std::string & | GetPath () const =0 |
| Retrieves the original file path the texture was loaded from. | |
| virtual Ref< Image2D > | GetImage () const =0 |
| Retrieves the underlying Image2D resource. | |
| Public Member Functions inherited from Raven::RefCounted | |
| RefCounted () | |
| virtual | ~RefCounted () |
| void | IncRefCount () |
| void | DecRefCount () |
| u32 | GetRefCount () const |
Factory and concrete interface for 2D textures.
Provides static methods to create 2D textures:
|
static |
Loads a 2D texture from a file path.
| path | The file path to the texture image. |
| loadUnorm | Specifies whether or not the texture is supposed to have ImageFormat::RGBA8_UNORM. |
|
inlinestaticconstexpr |