From 3503d10c441f31deacbc36bf44a5bf8dbb61d93e Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sat, 27 Jul 2024 03:08:47 +0200 Subject: [PATCH] Remove unecessary class OpenGlMonitor --- .../graphics/glfw/classes/GlfwMonitor.java | 2 +- .../graphics/opengl/OpenGlInternalApi.java | 7 ++-- .../opengl/classes/OpenGlMonitor.java | 35 ------------------- 3 files changed, 3 insertions(+), 41 deletions(-) delete mode 100644 graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/classes/OpenGlMonitor.java diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwMonitor.java b/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwMonitor.java index 2072fbb..c0e5d87 100644 --- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwMonitor.java +++ b/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwMonitor.java @@ -96,7 +96,7 @@ public class GlfwMonitor extends Monitor { checkConnected(); GLFWVidMode videoMode = Objects.requireNonNull(glfwGetVideoMode(identifierLong)); - + return new Vec2i(videoMode.width(), videoMode.height()); } diff --git a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlInternalApi.java b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlInternalApi.java index fbb1bb8..daf5f48 100644 --- a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlInternalApi.java +++ b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlInternalApi.java @@ -20,15 +20,12 @@ package de.staropensource.sosengine.graphics.opengl; import de.staropensource.sosengine.graphics.classes.Monitor; -import de.staropensource.sosengine.graphics.classes.api.ApiInternalClass; import de.staropensource.sosengine.graphics.classes.Window; import de.staropensource.sosengine.graphics.glfw.classes.GlfwInternalClass; -import de.staropensource.sosengine.graphics.opengl.classes.OpenGlMonitor; +import de.staropensource.sosengine.graphics.glfw.classes.GlfwMonitor; import de.staropensource.sosengine.graphics.opengl.classes.OpenGlWindow; import org.jetbrains.annotations.NotNull; -import java.util.Set; - public final class OpenGlInternalApi extends GlfwInternalClass { /** {@inheritDoc} */ @Override @@ -40,6 +37,6 @@ public final class OpenGlInternalApi extends GlfwInternalClass { /** {@inheritDoc} */ @Override public @NotNull Class getMonitorClass() { - return OpenGlMonitor.class; + return GlfwMonitor.class; } } diff --git a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/classes/OpenGlMonitor.java b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/classes/OpenGlMonitor.java deleted file mode 100644 index 3e18666..0000000 --- a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/classes/OpenGlMonitor.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * STAROPENSOURCE ENGINE SOURCE FILE - * Copyright (c) 2024 The StarOpenSource Engine Contributors - * Licensed under the GNU Affero General Public License v3 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package de.staropensource.sosengine.graphics.opengl.classes; - -import de.staropensource.sosengine.graphics.exceptions.InvalidMonitorException; -import de.staropensource.sosengine.graphics.glfw.classes.GlfwMonitor; - -public class OpenGlMonitor extends GlfwMonitor { - /** - * Constructs this class. - * - * @param identifier glfw monitor pointer - * @since v1-alpha2 - */ - public OpenGlMonitor(long identifier) throws InvalidMonitorException { - super(identifier); - } -}