From 7962a15c12527750b7dcc86196d17f19aa0e95dc Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 21 Jul 2024 16:44:57 +0200 Subject: [PATCH] Sort methods in OpenGlSubsystem --- .../graphics/opengl/OpenGlSubsystem.java | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlSubsystem.java b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlSubsystem.java index db20d38..860fb57 100644 --- a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlSubsystem.java +++ b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlSubsystem.java @@ -139,6 +139,32 @@ public final class OpenGlSubsystem implements ApiMainClass { logger.info("Initialized Graphics API in " + initTime + "ms"); } + /** + * Shuts the graphics subsystem down. + * + * @since v1-alpha0 + */ + public static void shutdownApi() { + LoggerInstance logger = instance.logger; + logger.verb("Shutting down"); + + @SuppressWarnings("resource") + long shutdownTime = Miscellaneous.measureExecutionTime(() -> { + glfwTerminate(); + //noinspection DataFlowIssue + glfwSetErrorCallback(null).free(); + }); + + logger.info("Shut down in " + shutdownTime + "ms"); + } + + /** {@inheritDoc} */ + @NotNull + @Override + public DependencyVector getDependencyVector() { + return new DependencyVector("opengl", StarOpenSourceVersioningSystem.class, EngineInformation.getVersioningString()); + } + /** {@inheritDoc} */ @Override public String getApiName() { @@ -183,30 +209,4 @@ public final class OpenGlSubsystem implements ApiMainClass { public static void onGraphicsApiError(String error) { instance.logger.error("Graphics API returned an error: " + error); } - - /** - * Shuts the graphics subsystem down. - * - * @since v1-alpha0 - */ - public static void shutdownApi() { - LoggerInstance logger = instance.logger; - logger.verb("Shutting down"); - - @SuppressWarnings("resource") - long shutdownTime = Miscellaneous.measureExecutionTime(() -> { - glfwTerminate(); - //noinspection DataFlowIssue - glfwSetErrorCallback(null).free(); - }); - - logger.info("Shut down in " + shutdownTime + "ms"); - } - - /** {@inheritDoc} */ - @NotNull - @Override - public DependencyVector getDependencyVector() { - return new DependencyVector("opengl", StarOpenSourceVersioningSystem.class, EngineInformation.getVersioningString()); - } }