![]() |
Raven Engine v0.1
|
Factory and concrete interface for 2D textures. More...
#include <Texture.h>
Static Public Member Functions | |
| 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. | |
Additional Inherited Members | |
| Public Member Functions inherited from Raven::Texture | |
| virtual | ~Texture ()=default |
| Virtual destructor. | |
| 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. | |
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. |
|
static |
Creates a 2D texture from a TextureSpecification.
| specification | The TextureSpecification detailing properties. |