From 72101473d05bd888843a069eedcf79cfb1c044ab Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 11 Jan 2017 10:47:45 +0100 Subject: [PATCH] - fixed: The texture for legacy dynamic light handling was always allocated, even if not needed, and it was never freed. --- src/gl/renderer/gl_renderer.cpp | 3 ++- src/win32/i_main.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gl/renderer/gl_renderer.cpp b/src/gl/renderer/gl_renderer.cpp index 57d17dfb4..6021411be 100644 --- a/src/gl/renderer/gl_renderer.cpp +++ b/src/gl/renderer/gl_renderer.cpp @@ -164,7 +164,7 @@ void FGLRenderer::Initialize(int width, int height) } else mVAOID = 0; - gllight = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/gllight.png"), FTexture::TEX_MiscPatch); + if (gl.legacyMode) gllight = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/gllight.png"), FTexture::TEX_MiscPatch); glpart2 = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/glpart2.png"), FTexture::TEX_MiscPatch); glpart = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/glpart.png"), FTexture::TEX_MiscPatch); mirrortexture = FTexture::CreateTexture(Wads.GetNumForFullName("glstuff/mirror.png"), FTexture::TEX_MiscPatch); @@ -196,6 +196,7 @@ FGLRenderer::~FGLRenderer() if (mLights != NULL) delete mLights; if (glpart2) delete glpart2; if (glpart) delete glpart; + if (gllight) delete gllight; if (mirrortexture) delete mirrortexture; if (mFBID != 0) glDeleteFramebuffers(1, &mFBID); if (mVAOID != 0) diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index 14c4791c6..906bf9539 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -1337,7 +1337,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE nothing, LPSTR cmdline, int n _CrtSetDbgFlag (_CrtSetDbgFlag(0) | _CRTDBG_LEAK_CHECK_DF); // Use this to break at a specific allocation number. - //_crtBreakAlloc = 53039; + _crtBreakAlloc = 124459; #endif DoMain (hInstance);