diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/elements/Element.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/elements/Element.kt index 065a0b926..64e1e35c5 100644 --- a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/elements/Element.kt +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/elements/Element.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2023 Moritz Zwerger + * Copyright (C) 2020-2025 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -28,7 +28,6 @@ import de.bixilon.minosoft.gui.rendering.util.vec.vec2.Vec2Util.isGreater import de.bixilon.minosoft.gui.rendering.util.vec.vec2.Vec2Util.isSmaller import de.bixilon.minosoft.gui.rendering.util.vec.vec4.Vec4Util.EMPTY import de.bixilon.minosoft.gui.rendering.util.vec.vec4.Vec4Util.spaceSize -import de.bixilon.minosoft.util.collections.DirectList abstract class Element(val guiRenderer: GUIRenderer, initialCacheSize: Int = 1000) : InputElement, DragTarget { var ignoreDisplaySize = false @@ -166,10 +165,6 @@ abstract class Element(val guiRenderer: GUIRenderer, initialCacheSize: Int = 100 cache.offset = Vec2(offset) cache.options = options forceRender(offset, cache, options) - if (cache.data !is DirectList) { - // not raw mesh data - cache.data.finish() - } cacheUpToDate = true } if (!directRendering) { diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/mesh/GUIMeshCache.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/mesh/GUIMeshCache.kt index 04e21c12a..f2e055303 100644 --- a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/mesh/GUIMeshCache.kt +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/mesh/GUIMeshCache.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2023 Moritz Zwerger + * Copyright (C) 2020-2025 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -36,11 +36,7 @@ class GUIMeshCache( var options: GUIVertexOptions? = null fun clear() { - if (data.finished) { - data = HeapArrayFloatList(initialSize = data.size) - } else { - data.clear() - } + data.clear() }