Class ItemIconCache
java.lang.Object
de.luckymcdev.foundryengine.client.imgui.ItemIconCache
Manages the lifecycle of item icon textures rendered offscreen via
OffscreenRenderer.
Call order each frame:
processQueue(OffscreenRenderer)— drains GPU readbacks and starts new renders- ImGui rendering —
get(ItemStack)returns cachedImTextures
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()@Nullable ImTextureget(net.minecraft.world.item.ItemStack stack) Returns the cached icon forstack, ornullif it hasn't been rendered yet (it will be queued automatically).voidprocessQueue(OffscreenRenderer renderer) Drains arrived GPU readbacks fromrendererinto the cache, then kicks off up to 25 new render jobs.
-
Constructor Details
-
ItemIconCache
public ItemIconCache()
-
-
Method Details
-
get
Returns the cached icon forstack, ornullif it hasn't been rendered yet (it will be queued automatically). -
processQueue
Drains arrived GPU readbacks fromrendererinto the cache, then kicks off up to 25 new render jobs. Call this once per frame before any ImGui rendering. -
clear
public void clear()
-