Skip to content

Commit 4535573

Browse files
committed
Fixed a bug that animated textures were unexpectedly freed on level change.
1 parent aec34ac commit 4535573

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

Plugins/Renderer/gl_draw.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ void GL_GenerateHashedTextureIndentifier3(const char* identifier, GL_TEXTURETYPE
203203
{
204204
#define FORMAT_TEXTURE_IDENTIFIER(Ty, Name) if (textureType == Ty)\
205205
{\
206-
snprintf(hashedIdentifier, len, "#" Name "_%08X_%04X_%04X_%04X_%04X", MurmurHash2(identifier, strlen(identifier), textureType), width, height, numframes, frameduration);\
206+
snprintf(hashedIdentifier, len, "@" Name "_%08X_%04X_%04X_%04X_%04X", MurmurHash2(identifier, strlen(identifier), textureType), width, height, numframes, frameduration);\
207207
return;\
208208
}
209209

Plugins/Renderer/gl_rmain.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -1712,11 +1712,7 @@ void GL_Init(void)
17121712
//No vanilla detail texture support
17131713
(*detTexSupported) = false;
17141714

1715-
#ifdef _DEBUG
1716-
if (1)
1717-
#else
17181715
if (gEngfuncs.CheckParm("-gl_debugoutput", NULL))
1719-
#endif
17201716
{
17211717
glDebugMessageCallback(GL_DebugOutputCallback, 0);
17221718
glEnable(GL_DEBUG_OUTPUT);

Plugins/Renderer/gl_rmisc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ void GL_FreeTextureEntry(gltexture_t *glt, bool notify_callback)
398398
return;
399399
}
400400

401-
gEngfuncs.Con_DPrintf("GL_FreeTextureEntry: [%d] [%s].\n", glt->texnum, glt->identifier);
401+
gEngfuncs.Con_DPrintf("GL_FreeTextureEntry: [%d] [%s] [%d].\n", glt->texnum, glt->identifier, notify_callback ? 1 : 0);
402402

403403
if (notify_callback)
404404
{

0 commit comments

Comments
 (0)