Use GTNHLib MemoryUtils instead of the builtin compat ones (#853)

This commit is contained in:
Raven Szewczyk authored and GitHub committed 2025-01-26 11:20:43 -08:00
1 parent 9029182353
commit 7e2399714c
33 files changed
+256 -1011

No files matched your search

@@ -1,6 +1,8 @@
package net.coderbot.iris.gl.framebuffer;
import com.gtnewhorizons.angelica.compat.lwjgl.MemoryStack;
import static com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack.*;
import com.gtnewhorizon.gtnhlib.bytebuf.MemoryStack;
import com.gtnewhorizons.angelica.glsm.RenderSystem;
import com.gtnewhorizons.angelica.glsm.texture.TextureInfoCache;
import it.unimi.dsi.fastutil.ints.Int2IntArrayMap;
@@ -51,7 +53,7 @@ public class GlFramebuffer extends GlResource {
}
public void noDrawBuffers() {
try (MemoryStack stack = MemoryStack.stackPush()) {
try (MemoryStack stack = stackPush()) {
final IntBuffer buffer = stack.mallocInt(1);
buffer.put(GL11.GL_NONE);
RenderSystem.drawBuffers(getGlId(), buffer);
@@ -59,7 +61,7 @@ public class GlFramebuffer extends GlResource {
}
public void drawBuffers(int[] buffers) {
try (MemoryStack stack = MemoryStack.stackPush()) {
try (MemoryStack stack = stackPush()) {
final IntBuffer glBuffers = stack.mallocInt(buffers.length);
int index = 0;