mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-26 15:06:28 +01:00
Bump version and remove unnecessary code after fence fix
This commit is contained in:
parent
e320a7144e
commit
4eb36f77f7
3 changed files with 1 additions and 53 deletions
|
@ -2,7 +2,7 @@ org.gradle.jvmargs = -Xmx3G
|
||||||
org.gradle.daemon = false
|
org.gradle.daemon = false
|
||||||
|
|
||||||
# mod version info
|
# mod version info
|
||||||
mod_version = 0.6.10
|
mod_version = 0.6.11
|
||||||
artifact_minecraft_version = 1.19.2
|
artifact_minecraft_version = 1.19.2
|
||||||
|
|
||||||
minecraft_version = 1.19.2
|
minecraft_version = 1.19.2
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -30,13 +30,11 @@ public class GlCompat {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final InstancedArrays instancedArrays;
|
public final InstancedArrays instancedArrays;
|
||||||
public final BufferStorage bufferStorage;
|
|
||||||
public final boolean amd;
|
public final boolean amd;
|
||||||
|
|
||||||
private GlCompat() {
|
private GlCompat() {
|
||||||
GLCapabilities caps = GL.createCapabilities();
|
GLCapabilities caps = GL.createCapabilities();
|
||||||
instancedArrays = getLatest(InstancedArrays.class, caps);
|
instancedArrays = getLatest(InstancedArrays.class, caps);
|
||||||
bufferStorage = getLatest(BufferStorage.class, caps);
|
|
||||||
|
|
||||||
if (Util.getPlatform() == Util.OS.WINDOWS) {
|
if (Util.getPlatform() == Util.OS.WINDOWS) {
|
||||||
String vendor = GL20C.glGetString(GL20C.GL_VENDOR);
|
String vendor = GL20C.glGetString(GL20C.GL_VENDOR);
|
||||||
|
@ -55,10 +53,6 @@ public class GlCompat {
|
||||||
return instancedArrays != InstancedArrays.UNSUPPORTED;
|
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.
|
* Get the most compatible version of a specific OpenGL feature by iterating over enum constants in order.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue