Skip to content

Commit

Permalink
Fixed a bug that animated textures were unexpectedly freed on level c…
Browse files Browse the repository at this point in the history
…hange.
  • Loading branch information
hzqst committed Jan 24, 2024
1 parent aec34ac commit 4535573
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Plugins/Renderer/gl_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void GL_GenerateHashedTextureIndentifier3(const char* identifier, GL_TEXTURETYPE
{
#define FORMAT_TEXTURE_IDENTIFIER(Ty, Name) if (textureType == Ty)\
{\
snprintf(hashedIdentifier, len, "#" Name "_%08X_%04X_%04X_%04X_%04X", MurmurHash2(identifier, strlen(identifier), textureType), width, height, numframes, frameduration);\
snprintf(hashedIdentifier, len, "@" Name "_%08X_%04X_%04X_%04X_%04X", MurmurHash2(identifier, strlen(identifier), textureType), width, height, numframes, frameduration);\
return;\
}

Expand Down
4 changes: 0 additions & 4 deletions Plugins/Renderer/gl_rmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1712,11 +1712,7 @@ void GL_Init(void)
//No vanilla detail texture support
(*detTexSupported) = false;

#ifdef _DEBUG
if (1)
#else
if (gEngfuncs.CheckParm("-gl_debugoutput", NULL))
#endif
{
glDebugMessageCallback(GL_DebugOutputCallback, 0);
glEnable(GL_DEBUG_OUTPUT);
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Renderer/gl_rmisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ void GL_FreeTextureEntry(gltexture_t *glt, bool notify_callback)
return;
}

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

if (notify_callback)
{
Expand Down

0 comments on commit 4535573

Please sign in to comment.