From 38e0b6e2ab53374e7335fee94209bb90cb3e9ed2 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 21 Jan 2018 23:13:25 +1000 Subject: AbstractTexture: Move Bind() method to Renderer This makes state tracking simpler, and enables easier porting to command lists later on. --- Source/Core/VideoCommon/AbstractTexture.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/AbstractTexture.cpp') diff --git a/Source/Core/VideoCommon/AbstractTexture.cpp b/Source/Core/VideoCommon/AbstractTexture.cpp index 896d75feb8..c3df347e48 100644 --- a/Source/Core/VideoCommon/AbstractTexture.cpp +++ b/Source/Core/VideoCommon/AbstractTexture.cpp @@ -15,7 +15,10 @@ AbstractTexture::AbstractTexture(const TextureConfig& c) : m_config(c) { } -AbstractTexture::~AbstractTexture() = default; +AbstractTexture::~AbstractTexture() +{ + g_renderer->UnbindTexture(this); +} bool AbstractTexture::Save(const std::string& filename, unsigned int level) { -- cgit v1.2.3