mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
- fixed: The texture for legacy dynamic light handling was always allocated, even if not needed, and it was never freed.
This commit is contained in:
parent
d1ce098d59
commit
72101473d0
2 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue