diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-01 23:05:27 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-01 23:05:27 +0100 |
commit | b6fdd1d644368226054094a282f5db24b31b5ba2 (patch) | |
tree | f995c792d6b8330a7880dada88d470bd357279e7 /src/crepe/api/Texture.h | |
parent | cbd4b97d348c46f4f43fe59683a5e3d1bdbc500f (diff) | |
parent | 647eb8e318f1ed1e3ec18505ea4df57025e6ffd5 (diff) |
merge with master
Diffstat (limited to 'src/crepe/api/Texture.h')
-rw-r--r-- | src/crepe/api/Texture.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/crepe/api/Texture.h b/src/crepe/api/Texture.h index 6965223..7206a66 100644 --- a/src/crepe/api/Texture.h +++ b/src/crepe/api/Texture.h @@ -25,16 +25,10 @@ class Texture { public: /** - * \brief Constructs a Texture from a file path. - * \param src Path to the image file to be loaded as a texture. - */ - Texture(const char * src); - - /** * \brief Constructs a Texture from an Asset resource. - * \param res Unique pointer to an Asset resource containing texture data. + * \param src Asset with texture data to load. */ - Texture(std::unique_ptr<Asset> res); + Texture(const Asset & src); /** * \brief Destroys the Texture instance, freeing associated resources. @@ -42,6 +36,11 @@ public: ~Texture(); // FIXME: this constructor shouldn't be necessary because this class doesn't manage memory + Texture(Texture && other) noexcept; + Texture & operator=(Texture && other) noexcept; + Texture(const Texture &) = delete; + Texture & operator=(const Texture &) = delete; + /** * \brief Gets the width of the texture. * \return Width of the texture in pixels. @@ -59,7 +58,7 @@ private: * \brief Loads the texture from an Asset resource. * \param res Unique pointer to an Asset resource to load the texture from. */ - void load(std::unique_ptr<Asset> res); + void load(const Asset & res); private: //! The texture of the class from the library |