Deleting texture thats getting rended too.
This commit is contained in:
+1
-1
Submodule assets updated: 52ea74c5d5...3a7f782958
@@ -13,7 +13,7 @@ class DrawBloomPass
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DrawBloomPass(IRenderer* renderer, ConfigFile* config);
|
DrawBloomPass(IRenderer* renderer, ConfigFile* config);
|
||||||
~DrawBloomPass() { }
|
~DrawBloomPass();
|
||||||
void InitializeTextures();
|
void InitializeTextures();
|
||||||
void InitializeFrameBuffers();
|
void InitializeFrameBuffers();
|
||||||
void InitializeShaderPrograms();
|
void InitializeShaderPrograms();
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class DrawFinalPass
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass);
|
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass);
|
||||||
~DrawFinalPass() { }
|
~DrawFinalPass();
|
||||||
void InitializeTextures();
|
void InitializeTextures();
|
||||||
void InitializeFrameBuffers();
|
void InitializeFrameBuffers();
|
||||||
void InitializeShaderPrograms();
|
void InitializeShaderPrograms();
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public:
|
|||||||
: m_EventBroker(eventBroker)
|
: m_EventBroker(eventBroker)
|
||||||
, m_Config(config)
|
, m_Config(config)
|
||||||
{ }
|
{ }
|
||||||
|
~Renderer();
|
||||||
|
|
||||||
virtual void Initialize() override;
|
virtual void Initialize() override;
|
||||||
virtual void Update(double dt) override;
|
virtual void Update(double dt) override;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class SSAOPass
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SSAOPass(IRenderer* renderer, ConfigFile* config);
|
SSAOPass(IRenderer* renderer, ConfigFile* config);
|
||||||
~SSAOPass() { };
|
~SSAOPass();
|
||||||
|
|
||||||
void ChangeQuality(int quality);
|
void ChangeQuality(int quality);
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ DrawBloomPass::DrawBloomPass(IRenderer* renderer, ConfigFile* config)
|
|||||||
ChangeQuality(m_Config->Get<int>("GLOW.Quality", 2));
|
ChangeQuality(m_Config->Get<int>("GLOW.Quality", 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DrawBloomPass::~DrawBloomPass() {
|
||||||
|
CommonFunctions::DeleteTexture(&m_GaussianTexture_horiz);
|
||||||
|
CommonFunctions::DeleteTexture(&m_GaussianTexture_vert);
|
||||||
|
}
|
||||||
|
|
||||||
void DrawBloomPass::InitializeTextures()
|
void DrawBloomPass::InitializeTextures()
|
||||||
{
|
{
|
||||||
m_BlackTexture = CommonFunctions::LoadTexture("Textures/Core/Black.png", false);
|
m_BlackTexture = CommonFunctions::LoadTexture("Textures/Core/Black.png", false);
|
||||||
|
|||||||
@@ -12,6 +12,14 @@ DrawFinalPass::DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCulling
|
|||||||
InitializeFrameBuffers();
|
InitializeFrameBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DrawFinalPass::~DrawFinalPass(){
|
||||||
|
CommonFunctions::DeleteTexture(&m_BloomTexture);
|
||||||
|
CommonFunctions::DeleteTexture(&m_SceneTexture);
|
||||||
|
CommonFunctions::DeleteTexture(&m_DepthBuffer);
|
||||||
|
CommonFunctions::DeleteTexture(&m_ShieldBuffer);
|
||||||
|
CommonFunctions::DeleteTexture(&m_CubeMapTexture);
|
||||||
|
}
|
||||||
|
|
||||||
void DrawFinalPass::InitializeTextures()
|
void DrawFinalPass::InitializeTextures()
|
||||||
{
|
{
|
||||||
m_WhiteTexture = CommonFunctions::LoadTexture("Textures/Core/White.png", false);
|
m_WhiteTexture = CommonFunctions::LoadTexture("Textures/Core/White.png", false);
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ PickingPass::PickingPass(IRenderer* renderer, EventBroker* eb)
|
|||||||
|
|
||||||
PickingPass::~PickingPass()
|
PickingPass::~PickingPass()
|
||||||
{
|
{
|
||||||
|
CommonFunctions::DeleteTexture(&m_PickingTexture);
|
||||||
|
CommonFunctions::DeleteTexture(&m_DepthBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,19 @@
|
|||||||
|
|
||||||
std::unordered_map<GLFWwindow*, Renderer*> Renderer::m_WindowToRenderer;
|
std::unordered_map<GLFWwindow*, Renderer*> Renderer::m_WindowToRenderer;
|
||||||
|
|
||||||
|
Renderer::~Renderer() {
|
||||||
|
delete m_PickingPass;
|
||||||
|
delete m_LightCullingPass;
|
||||||
|
delete m_ImGuiRenderPass;
|
||||||
|
delete m_DrawFinalPass;
|
||||||
|
delete m_DrawScreenQuadPass;
|
||||||
|
delete m_DrawBloomPass;
|
||||||
|
delete m_DrawColorCorrectionPass;
|
||||||
|
delete m_SSAOPass;
|
||||||
|
delete m_CubeMapPass;
|
||||||
|
delete m_TextPass;
|
||||||
|
}
|
||||||
|
|
||||||
void Renderer::Initialize()
|
void Renderer::Initialize()
|
||||||
{
|
{
|
||||||
m_SSAO_Quality = m_Config->Get<int>("SSAO.Quality", 0);
|
m_SSAO_Quality = m_Config->Get<int>("SSAO.Quality", 0);
|
||||||
|
|||||||
@@ -10,6 +10,13 @@ SSAOPass::SSAOPass(IRenderer* renderer, ConfigFile* config)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SSAOPass::~SSAOPass() {
|
||||||
|
CommonFunctions::DeleteTexture(&m_SSAOTexture);
|
||||||
|
CommonFunctions::DeleteTexture(&m_SSAOViewSpaceZTexture);
|
||||||
|
CommonFunctions::DeleteTexture(&m_Gaussian_horiz);
|
||||||
|
CommonFunctions::DeleteTexture(&m_Gaussian_vert);
|
||||||
|
}
|
||||||
|
|
||||||
void SSAOPass::ChangeQuality(int quality)
|
void SSAOPass::ChangeQuality(int quality)
|
||||||
{
|
{
|
||||||
if (m_Quality == quality) {
|
if (m_Quality == quality) {
|
||||||
|
|||||||
Reference in New Issue
Block a user