diff --git a/lib/Ray/sources/Drawables/Texture.cpp b/lib/Ray/sources/Drawables/Texture.cpp index 01ae2eff..412557d1 100644 --- a/lib/Ray/sources/Drawables/Texture.cpp +++ b/lib/Ray/sources/Drawables/Texture.cpp @@ -48,4 +48,10 @@ Image RAY::Texture::toImage(void) const const ::Texture &RAY::Texture::getTexture(void) const { return this->_texture; +} + +bool RAY::Texture::unload() +{ + UnloadTexture(this->_texture); + return true; } \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/Texture.hpp b/lib/Ray/sources/Drawables/Texture.hpp index e81b8437..99c38eef 100644 --- a/lib/Ray/sources/Drawables/Texture.hpp +++ b/lib/Ray/sources/Drawables/Texture.hpp @@ -35,7 +35,7 @@ namespace RAY Texture &operator=(const Texture &) = default; //! @brief Texture destructor, will unload ressources - ~Texture(); + ~Texture() override; //! @brief load ressources from file //! @param filename: path of input diff --git a/lib/Ray/sources/Window.hpp b/lib/Ray/sources/Window.hpp index 9e67182e..3b7db92c 100644 --- a/lib/Ray/sources/Window.hpp +++ b/lib/Ray/sources/Window.hpp @@ -96,7 +96,7 @@ namespace RAY { //! @brief draw rectangle //! @param drawable The drawable to render on screen - void draw(Drawables::IDrawable &drawable); + void draw(Drawables::IDrawable &drawable) override; //! @brief draw texture at position //! @param texture The object to render