diff --git a/include/Texture.hpp b/include/Texture.hpp index 1de51892..ea77dfe1 100644 --- a/include/Texture.hpp +++ b/include/Texture.hpp @@ -62,6 +62,31 @@ class Texture : public TextureUnmanaged { return *this; } + + /** + * Unload previous texture, then load texture from image data + */ + void Load(const ::Image& image) { + Unload(); + TextureUnmanaged::Load(image); + } + + /** + * Unload previous texture, then load cubemap from image. + * Multiple image cubemap layouts supported + */ + void Load(const ::Image& image, int layoutType) { + Unload(); + TextureUnmanaged::Load(image, layoutType); + } + + /** + * Unload previous texture, then load texture from file into GPU memory (VRAM) + */ + void Load(const std::string& fileName) { + Unload(); + TextureUnmanaged::Load(fileName); + } }; // Create the Texture aliases.