remove texture auto_destroy flag

This commit is contained in:
2019-12-01 18:52:41 +01:00
parent f6c1194cb3
commit 94cf227704
7 changed files with 4 additions and 19 deletions

View File

@@ -149,7 +149,6 @@ Texture2D::Texture2D(Texture2D&& other) noexcept
m_height = other.m_height;
m_format = other.m_format;
m_iformat = other.m_iformat;
auto_destroy = other.auto_destroy;
has_mips = other.has_mips;
other.m_tex = false;
}
@@ -161,7 +160,6 @@ void Texture2D::operator=(Texture2D&& other) noexcept
m_height = other.m_height;
m_format = other.m_format;
m_iformat = other.m_iformat;
auto_destroy = other.auto_destroy;
has_mips = other.has_mips;
other.m_tex = false;
}
@@ -271,11 +269,7 @@ glm::vec2 Texture2D::size() const
Texture2D::~Texture2D()
{
//if (auto_destroy)
{
LOG("Texture2D auto destroy");
destroy();
}
destroy();
}
bool Sampler::create(GLint filter /*= GL_LINEAR*/, GLint wrap /*= GL_CLAMP_TO_EDGE*/)