Object representation of a texture.
Definition: Texture.hpp:19
static Cache<::Texture > _texturesCache
Definition: Texture.hpp:61
Texture & operator=(const Texture &)=default
An texture is assignable.
std::string _resourcePath
path to the file the texture is loaded from
Definition: Texture.hpp:59
~Texture() override=default
Texture destructor, will not unload ressources.
Texture & use(const std::string &filename)
Load texture from file, lets one use one entity for multiple files.
Definition: Texture.cpp:41
const std::string & getResourcePath() const
Definition: Texture.cpp:51
void unload()
Unload the current texture (calls to drawOn will no-op).
Definition: Texture.cpp:68
Texture()
Create an empty texture.
Definition: Texture.cpp:22
std::shared_ptr<::Texture > _texture
Texture, really, that's just it...
Definition: Texture.hpp:56
void drawOn(RAY::Window &) override
draw texture on a window
Definition: Texture.cpp:61