From 4eb36f77f77b4a3b3954ae3d9ce967b426ce7d2f Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Sun, 1 Sep 2024 17:13:26 -0700 Subject: [PATCH] Bump version and remove unnecessary code after fence fix --- gradle.properties | 2 +- .../backend/gl/versioned/BufferStorage.java | 46 ------------------- .../backend/gl/versioned/GlCompat.java | 6 --- 3 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 src/main/java/com/jozufozu/flywheel/backend/gl/versioned/BufferStorage.java diff --git a/gradle.properties b/gradle.properties index 3fbe7df91..63b58b2d6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs = -Xmx3G org.gradle.daemon = false # mod version info -mod_version = 0.6.10 +mod_version = 0.6.11 artifact_minecraft_version = 1.19.2 minecraft_version = 1.19.2 diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/BufferStorage.java b/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/BufferStorage.java deleted file mode 100644 index a1d787037..000000000 --- a/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/BufferStorage.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.jozufozu.flywheel.backend.gl.versioned; - -import org.lwjgl.opengl.ARBBufferStorage; -import org.lwjgl.opengl.GL44; -import org.lwjgl.opengl.GLCapabilities; - -import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType; - -public enum BufferStorage implements GlVersioned { - - GL44CORE { - @Override - public boolean supported(GLCapabilities caps) { - return caps.OpenGL44; - } - - @Override - public void bufferStorage(GlBufferType target, long size, int flags) { - GL44.glBufferStorage(target.glEnum, size, flags); - } - }, - ARB { - @Override - public boolean supported(GLCapabilities caps) { - return caps.GL_ARB_buffer_storage; - } - - @Override - public void bufferStorage(GlBufferType target, long size, int flags) { - ARBBufferStorage.glBufferStorage(target.glEnum, size, flags); - } - }, - UNSUPPORTED { - @Override - public boolean supported(GLCapabilities caps) { - return true; - } - - @Override - public void bufferStorage(GlBufferType target, long size, int flags) { - throw new UnsupportedOperationException(); - } - }; - - public abstract void bufferStorage(GlBufferType target, long size, int flags); -} diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/GlCompat.java b/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/GlCompat.java index 0aaffe754..9eab2552c 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/GlCompat.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/GlCompat.java @@ -30,13 +30,11 @@ public class GlCompat { } public final InstancedArrays instancedArrays; - public final BufferStorage bufferStorage; public final boolean amd; private GlCompat() { GLCapabilities caps = GL.createCapabilities(); instancedArrays = getLatest(InstancedArrays.class, caps); - bufferStorage = getLatest(BufferStorage.class, caps); if (Util.getPlatform() == Util.OS.WINDOWS) { String vendor = GL20C.glGetString(GL20C.GL_VENDOR); @@ -55,10 +53,6 @@ public class GlCompat { return instancedArrays != InstancedArrays.UNSUPPORTED; } - public boolean bufferStorageSupported() { - return bufferStorage != BufferStorage.UNSUPPORTED; - } - /** * Get the most compatible version of a specific OpenGL feature by iterating over enum constants in order. *