From 725b2cabac56191e82737834fe14cc65f478f1ba Mon Sep 17 00:00:00 2001 From: Jeremie Pelletier Date: Thu, 18 Sep 2025 18:19:23 -0400 Subject: [PATCH] Removes clears to the atlas texture; all draws cover the used parts --- src/boxy.nim | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/boxy.nim b/src/boxy.nim index 6f1b123..8e529b7 100644 --- a/src/boxy.nim +++ b/src/boxy.nim @@ -325,12 +325,6 @@ proc removeImage*(boxy: Boxy, key: string) = ) if key in boxy.entries: - # Clear the image from the atlas - boxy.atlasTexture.clearSubImage( - boxy.entries[key].atlasPos.x, - boxy.entries[key].atlasPos.y, - boxy.entries[key].cap - ) boxy.entries.del(key) proc grow(boxy: Boxy) = @@ -370,12 +364,8 @@ proc grow(boxy: Boxy) = 0 ) - # Clear the new atlas - glViewport(0, 0, newAtlasSize.GLint, newAtlasSize.GLint) - glClearColor(0, 0, 0, 0) - glClear(GL_COLOR_BUFFER_BIT) - # Set up for drawing to the new atlas + glViewport(0, 0, newAtlasSize.GLint, newAtlasSize.GLint) let savedProj = boxy.proj let savedMat = boxy.mat let savedMats = boxy.mats