Add Tex unloader

This commit is contained in:
tobid7 2022-07-19 14:22:52 +02:00
parent 54cce27a34
commit 86166f87eb
2 changed files with 13 additions and 0 deletions

View File

@ -970,6 +970,16 @@ void RenderD7::Image::LoadPng(const std::string path)
loadet = true;
}
RenderD7::Image::~Image()
{
C3D_TexDelete(img.tex);
}
void RenderD7::Image::Unload()
{
C3D_TexDelete(img.tex);
}
void RenderD7::Image::LoadPFromBuffer(const std::vector<u8> &buffer)
{
std::vector<u8> ImageBuffer;

View File

@ -96,6 +96,9 @@ namespace RenderD7
class Image
{
public:
~Image();
void Unload();
/// Load Image from Png
/// \param path path to png file
void LoadPng(const std::string path);