From 62e5183c54d032ae5bcb0d8ef4e9b05d1bb6312f Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 29 Jun 2024 10:18:27 -0600 Subject: [PATCH] Improve GLProxy creation validation/logging --- .../distanthorizons/core/render/glObject/GLProxy.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/GLProxy.java b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/GLProxy.java index ffe831b00..1184c57c5 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/GLProxy.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/glObject/GLProxy.java @@ -91,17 +91,15 @@ public class GLProxy private GLProxy() throws IllegalStateException { // this must be created on minecraft's render context to work correctly - - GL_LOGGER.info("Creating " + GLProxy.class.getSimpleName() + "... If this is the last message you see there must have been an OpenGL error."); - GL_LOGGER.info("Lod Render OpenGL version [" + GL32.glGetString(GL32.GL_VERSION) + "]."); - - // getting Minecraft's context has to be done on the render thread, - // where the GL context is if (GLFW.glfwGetCurrentContext() == 0L) { throw new IllegalStateException(GLProxy.class.getSimpleName() + " was created outside the render thread!"); } + GL_LOGGER.info("Creating " + GLProxy.class.getSimpleName() + "... If this is the last message you see there must have been an OpenGL error."); + GL_LOGGER.info("Lod Render OpenGL version [" + GL32.glGetString(GL32.GL_VERSION) + "]."); + + //============================//