remove unnecessary warning in GLBuffer

This commit is contained in:
James Seibel
2026-05-02 21:18:01 -05:00
parent c9267d61a8
commit 9feb20eff8
2 changed files with 4 additions and 15 deletions
@@ -214,22 +214,11 @@ public class GLBuffer implements AutoCloseable
}
bufferCount.decrementAndGet();
GLMC.glDeleteBuffers(id);
// destroy the buffer if it exists,
// the buffer may not exist if the destroy method is called twice
if (GL32.glIsBuffer(id))
if (Config.Client.Advanced.Debugging.logBufferGarbageCollection.get())
{
GLMC.glDeleteBuffers(id);
if (Config.Client.Advanced.Debugging.logBufferGarbageCollection.get())
{
LOGGER.info("destroyed buffer [" + id + "], remaining: [" + BUFFER_ID_TO_PHANTOM.size() + "]");
}
}
else
{
// shouldn't happen, but just in case
LOGGER.warn("Attempted to destroy a non buffer object with ID ["+id+"].");
LOGGER.info("destroyed buffer [" + id + "], remaining: [" + BUFFER_ID_TO_PHANTOM.size() + "], cause: ["+cause+"].");
}
}