From 0c4ee74254f0d9de34af0e7c5818f1c74ef053e2 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 30 Oct 2021 17:21:00 -0500 Subject: [PATCH] make the OpenGL proxy capabilities more specific --- src/main/java/com/seibel/lod/proxy/GlProxy.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/seibel/lod/proxy/GlProxy.java b/src/main/java/com/seibel/lod/proxy/GlProxy.java index 9418c7fda..9aa4567eb 100644 --- a/src/main/java/com/seibel/lod/proxy/GlProxy.java +++ b/src/main/java/com/seibel/lod/proxy/GlProxy.java @@ -100,9 +100,9 @@ public class GlProxy GLFW.glfwWindowHint(GLFW.GLFW_VISIBLE, GLFW.GLFW_FALSE); // create an invisible window to hold the context + lodBuilderGlCapabilities = GL.createCapabilities(); lodBuilderGlContext = GLFW.glfwCreateWindow(640, 480, "LOD window", 0L, minecraftGlContext); GLFW.glfwMakeContextCurrent(lodBuilderGlContext); - lodBuilderGlCapabilities = GL.createCapabilities(); // Since this is called on the render thread, make sure the Minecraft context is used in the end GLFW.glfwMakeContextCurrent(minecraftGlContext); @@ -115,8 +115,8 @@ public class GlProxy // determine the OpenGL version // //==============================// - bufferStorageSupported = minecraftGlCapabilities.OpenGL45; - mapBufferRangeSupported = minecraftGlCapabilities.OpenGL30; + bufferStorageSupported = minecraftGlCapabilities.glBufferStorage != 0; + mapBufferRangeSupported = minecraftGlCapabilities.glMapBufferRange != 0; if (!minecraftGlCapabilities.OpenGL15) { @@ -128,7 +128,7 @@ public class GlProxy { String fallBackVersion = mapBufferRangeSupported ? "3.0" : "1.5"; - ClientProxy.LOGGER.error("This GPU doesn't support OpenGL 4.5, falling back to OpenGL " + fallBackVersion + ". This may cause stuttering and reduced performance."); + ClientProxy.LOGGER.error("This GPU doesn't support Buffer Storage (OpenGL 4.5), falling back to OpenGL " + fallBackVersion + ". This may cause stuttering and reduced performance."); }