Add Tex unloader
This commit is contained in:
parent
54cce27a34
commit
86166f87eb
10
renderd7.cpp
10
renderd7.cpp
@ -970,6 +970,16 @@ void RenderD7::Image::LoadPng(const std::string path)
|
|||||||
loadet = true;
|
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)
|
void RenderD7::Image::LoadPFromBuffer(const std::vector<u8> &buffer)
|
||||||
{
|
{
|
||||||
std::vector<u8> ImageBuffer;
|
std::vector<u8> ImageBuffer;
|
||||||
|
@ -96,6 +96,9 @@ namespace RenderD7
|
|||||||
class Image
|
class Image
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
~Image();
|
||||||
|
|
||||||
|
void Unload();
|
||||||
/// Load Image from Png
|
/// Load Image from Png
|
||||||
/// \param path path to png file
|
/// \param path path to png file
|
||||||
void LoadPng(const std::string path);
|
void LoadPng(const std::string path);
|
||||||
|
Loading…
Reference in New Issue
Block a user