This subsystem largely does not provide any utility for your application, as it's interfaces and classes are meant to be implemented by Graphics APIs.
-
diff --git a/graphics/vulkan/README.md b/graphics/vulkan/README.md
deleted file mode 100644
index 24505370..00000000
--- a/graphics/vulkan/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# The `vulkan` subsystem
-This subsystem is a Graphics API, bringing Vulkan into the engine. This Graphics API does not work at the moment.
diff --git a/graphics/vulkan/build.gradle b/graphics/vulkan/build.gradle
deleted file mode 100644
index f1f163ba..00000000
--- a/graphics/vulkan/build.gradle
+++ /dev/null
@@ -1,143 +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 testConfiguration = new HashMap<>();
- for (String property : project.properties.keySet())
- if (property.startsWith("test."))
- testConfiguration.put(property, project.properties.get(property).toString())
- systemProperties(testConfiguration)
-
- setMaxParallelForks(project.hasProperty("jobs") ? Integer.parseInt((String) project.property("jobs")) : 8)
- setForkEvery(1)
- setFailFast(true)
-
- testLogging {
- events("passed", "skipped", "failed")
- }
-}
diff --git a/graphics/vulkan/gradle b/graphics/vulkan/gradle
deleted file mode 120000
index 1ce6c4c1..00000000
--- a/graphics/vulkan/gradle
+++ /dev/null
@@ -1 +0,0 @@
-../../gradle
\ No newline at end of file
diff --git a/graphics/vulkan/gradlew b/graphics/vulkan/gradlew
deleted file mode 120000
index 343e0d2c..00000000
--- a/graphics/vulkan/gradlew
+++ /dev/null
@@ -1 +0,0 @@
-../../gradlew
\ No newline at end of file
diff --git a/graphics/vulkan/gradlew.bat b/graphics/vulkan/gradlew.bat
deleted file mode 120000
index cb5a9464..00000000
--- a/graphics/vulkan/gradlew.bat
+++ /dev/null
@@ -1 +0,0 @@
-../../gradlew.bat
\ No newline at end of file
diff --git a/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanSubsystem.java b/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanSubsystem.java
deleted file mode 100644
index 93c0383a..00000000
--- a/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/VulkanSubsystem.java
+++ /dev/null
@@ -1,104 +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.vulkan;
-
-import de.staropensource.sosengine.base.annotations.EngineSubsystem;
-import de.staropensource.sosengine.base.classes.SubsystemClass;
-import de.staropensource.sosengine.base.data.information.EngineInformation;
-import de.staropensource.sosengine.base.data.versioning.StarOpenSourceVersioningSystem;
-import de.staropensource.sosengine.base.logging.LoggerInstance;
-import de.staropensource.sosengine.base.types.DependencyVector;
-import lombok.Getter;
-import org.jetbrains.annotations.NotNull;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * The main class of the Vulkan Graphics API.
- *
- * @since v1-alpha0
- */
-@EngineSubsystem
-@SuppressWarnings({ "JavadocDeclaration" })
-public final class VulkanSubsystem extends SubsystemClass {
- /**
- * Contains the class instance.
- *
- * @since v1-alpha0
- * -- GETTER --
- * Returns the class instance.
- *
- * @return class instance unless the subsystem is uninitialized
- * @since v1-alpha0
- */
- @Getter
- private static VulkanSubsystem instance = null;
-
- /**
- * Contains the {@link LoggerInstance} for this instance.
- *
- * @see LoggerInstance
- * @since v1-alpha1
- */
- private final @NotNull LoggerInstance logger = new LoggerInstance.Builder().setClazz(getClass()).setOrigin("ENGINE").build();
-
- /**
- * Constructs this subsystem.
- *
- * @since v1-alpha0
- */
- public VulkanSubsystem() {
- // Check if subsystem has already initialized
- if (instance == null)
- instance = this;
- else {
- instance.logger.crash("The subsystem tried to initialize twice");
- }
- }
-
- /** {@inheritDoc} */
- @Override
- public @NotNull String getName() {
- return "vulkan";
- }
-
- /** {@inheritDoc} */
- @Override
- public void initializeSubsystem() {
- // Warn about instability
- logger.warn("The Vulkan API is currently a stub and does not provide Vulkan as a Graphics API.\nIf you want to remove this message, remove the Vulkan subsystem from your dependencies.");
- }
-
- /** {@inheritDoc} */
- @Override
- public @NotNull DependencyVector getDependencyVector() {
- Set<@NotNull String> dependencies = new HashSet<>();
- dependencies.add("graphics");
- dependencies.add("glfw");
-
- return new DependencyVector.Builder()
- .setIdentifier(getName())
- .setVersioningSystem(StarOpenSourceVersioningSystem.class)
- .setVersion(EngineInformation.getVersioningString())
- .setDependencies(dependencies)
- .build();
- }
-}
diff --git a/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/package-info.java b/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/package-info.java
deleted file mode 100644
index e288c7dc..00000000
--- a/graphics/vulkan/src/main/java/de/staropensource/sosengine/graphics/vulkan/package-info.java
+++ /dev/null
@@ -1,25 +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 .
- */
-
-/**
- * Code of the Vulkan Graphics API.
- *
- * @since v1-alpha0
- */
-package de.staropensource.sosengine.graphics.vulkan;
diff --git a/graphics/vulkan/src/main/java/module-info.java b/graphics/vulkan/src/main/java/module-info.java
deleted file mode 100644
index 42feba13..00000000
--- a/graphics/vulkan/src/main/java/module-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Defines the Vulkan Graphics API and {@code vulkan} subsystem, which allows for communicating with the graphics card via Vulkan.
- *
- * @since v1-alpha1
- */
-module sosengine.graphics.vulkan {
- // Dependencies
- // -> Subsystems
- requires transitive sosengine.base;
- requires transitive sosengine.graphics;
- // -> Libraries
- requires transitive static lombok;
- requires transitive org.jetbrains.annotations;
- requires org.lwjgl.glfw;
-
- // API access
- exports de.staropensource.sosengine.graphics.vulkan;
-
- // Reflection access
- opens de.staropensource.sosengine.graphics.vulkan;
-}
diff --git a/graphics/vulkan/src/main/javadoc/overview.html b/graphics/vulkan/src/main/javadoc/overview.html
deleted file mode 100644
index 618963ae..00000000
--- a/graphics/vulkan/src/main/javadoc/overview.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-Welcome to the sos!engine API documentation!
- You are currently in the documentation for the vulkan subsystem, allowing the Vulkan Graphics API to be used.
-This subsystem does not provide any utility for your application, as it just implements interfaces and classes from the graphics subsystem.
-
diff --git a/graphics/vulkan/src/main/javadoc/theme.css b/graphics/vulkan/src/main/javadoc/theme.css
deleted file mode 120000
index bccac6b3..00000000
--- a/graphics/vulkan/src/main/javadoc/theme.css
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../src/main/javadoc/theme.css
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index a4f30230..c182b576 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -22,8 +22,6 @@ rootProject.setName("sosengine")
include("base")
include("ansi")
include("slf4j-compat")
-include("graphics")
-include("graphics:glfw")
-include("graphics:opengl")
-include("graphics:vulkan")
+include("windowing")
+include("windowing:glfw")
include("testapp")
diff --git a/testapp/build.gradle b/testapp/build.gradle
index 8b955206..bfcb965d 100644
--- a/testapp/build.gradle
+++ b/testapp/build.gradle
@@ -42,9 +42,7 @@ dependencies {
implementation(project(":base"))
implementation(project(":ansi"))
implementation(project(":slf4j-compat"))
- implementation(project(":graphics"))
- implementation(project(":graphics:vulkan"))
- implementation(project(":graphics:opengl"))
+ implementation(project(":windowing"))
}
// Fix delombok task
diff --git a/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java b/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java
index 36e10be8..8b1ab12d 100644
--- a/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java
+++ b/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java
@@ -29,11 +29,11 @@ import de.staropensource.sosengine.base.types.vectors.Vec2i;
import de.staropensource.sosengine.base.utility.DependencyResolver;
import de.staropensource.sosengine.base.utility.Miscellaneous;
import de.staropensource.sosengine.base.utility.parser.StackTraceParser;
-import de.staropensource.sosengine.graphics.GraphicsSubsystem;
-import de.staropensource.sosengine.graphics.classes.Window;
-import de.staropensource.sosengine.graphics.events.InputEvent;
-import de.staropensource.sosengine.graphics.types.input.Key;
-import de.staropensource.sosengine.graphics.types.input.KeyState;
+import de.staropensource.sosengine.windowing.WindowingSubsystem;
+import de.staropensource.sosengine.windowing.classes.Window;
+import de.staropensource.sosengine.windowing.events.InputEvent;
+import de.staropensource.sosengine.windowing.types.input.Key;
+import de.staropensource.sosengine.windowing.types.input.KeyState;
import lombok.Getter;
import lombok.SneakyThrows;
import org.jetbrains.annotations.NotNull;
@@ -180,9 +180,9 @@ public final class Main {
}
logger.warn("Test resolution succeeded");
- // Choose Graphics API to use
- if (!GraphicsSubsystem.getInstance().setGraphicsApi())
- logger.crash("No Graphics API is compatible");
+ // Choose windowing API to use
+ if (!WindowingSubsystem.getInstance().setApi())
+ logger.crash("No windowing API is compatible");
// Create window
Window window;
@@ -198,7 +198,7 @@ public final class Main {
return;
}
- LinkedHashMap<@NotNull Window, @NotNull Throwable> renderLoopFailures = GraphicsSubsystem
+ LinkedHashMap<@NotNull Window, @NotNull Throwable> renderLoopFailures = WindowingSubsystem
.getInstance()
.getApi()
.getManagement()
diff --git a/testapp/src/main/java/module-info.java b/testapp/src/main/java/module-info.java
index 0133a06c..bb89fa32 100644
--- a/testapp/src/main/java/module-info.java
+++ b/testapp/src/main/java/module-info.java
@@ -8,9 +8,7 @@ open module sosengine.testapp {
// Dependencies
// -> Subsystems
requires sosengine.base;
- requires sosengine.graphics;
- requires sosengine.graphics.opengl;
- requires sosengine.graphics.vulkan;
+ requires sosengine.windowing;
requires sosengine.slf4j_compat;
// -> Libraries
requires static lombok;
diff --git a/windowing/README.md b/windowing/README.md
new file mode 100644
index 00000000..9c9adcc9
--- /dev/null
+++ b/windowing/README.md
@@ -0,0 +1,2 @@
+# The `windowing` subsystem
+This subsystem provides abstract APIs for creating and managing windows and monitors, which can then be implemented by windowing APIs and used by applications and games.
diff --git a/graphics/build.gradle b/windowing/build.gradle
similarity index 100%
rename from graphics/build.gradle
rename to windowing/build.gradle
diff --git a/graphics/glfw/build.gradle b/windowing/glfw/build.gradle
similarity index 99%
rename from graphics/glfw/build.gradle
rename to windowing/glfw/build.gradle
index 9cae4231..3abc0183 100644
--- a/graphics/glfw/build.gradle
+++ b/windowing/glfw/build.gradle
@@ -79,7 +79,7 @@ dependencies {
// -> Project <-
implementation(project(":base"))
- implementation(project(":graphics"))
+ implementation(project(":windowing"))
}
// Fix delombok task
diff --git a/graphics/glfw/gradle b/windowing/glfw/gradle
similarity index 100%
rename from graphics/glfw/gradle
rename to windowing/glfw/gradle
diff --git a/graphics/glfw/gradlew b/windowing/glfw/gradlew
similarity index 100%
rename from graphics/glfw/gradlew
rename to windowing/glfw/gradlew
diff --git a/graphics/glfw/gradlew.bat b/windowing/glfw/gradlew.bat
similarity index 100%
rename from graphics/glfw/gradlew.bat
rename to windowing/glfw/gradlew.bat
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystem.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/GlfwSubsystem.java
similarity index 93%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystem.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/GlfwSubsystem.java
index 144f5433..628e4774 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystem.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/GlfwSubsystem.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw;
+package de.staropensource.sosengine.windowing.glfw;
import de.staropensource.sosengine.base.annotations.EngineSubsystem;
import de.staropensource.sosengine.base.classes.SubsystemClass;
@@ -26,9 +26,9 @@ import de.staropensource.sosengine.base.data.versioning.StarOpenSourceVersioning
import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.DependencyVector;
import de.staropensource.sosengine.base.utility.Miscellaneous;
-import de.staropensource.sosengine.graphics.events.GraphicsErrorEvent;
-import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException;
-import de.staropensource.sosengine.graphics.glfw.exceptions.GlfwInitializationException;
+import de.staropensource.sosengine.windowing.events.WindowingErrorEvent;
+import de.staropensource.sosengine.windowing.exceptions.NotOnMainThreadException;
+import de.staropensource.sosengine.windowing.glfw.exceptions.GlfwInitializationException;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.glfw.GLFWErrorCallback;
@@ -79,7 +79,7 @@ public final class GlfwSubsystem extends SubsystemClass {
/** {@inheritDoc} */
@Override
public void invoke(int error, long description) {
- new GraphicsErrorEvent().callEvent(description + " (" + error + ")");
+ new WindowingErrorEvent().callEvent(description + " (" + error + ")");
}
});
@@ -113,7 +113,7 @@ public final class GlfwSubsystem extends SubsystemClass {
@Override
public @NotNull DependencyVector getDependencyVector() {
Set<@NotNull String> dependencies = new HashSet<>();
- dependencies.add("graphics");
+ dependencies.add("windowing");
return new DependencyVector.Builder()
.setIdentifier(getName())
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystemConfiguration.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/GlfwSubsystemConfiguration.java
similarity index 95%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystemConfiguration.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/GlfwSubsystemConfiguration.java
index 0bbacecd..46a22a65 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystemConfiguration.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/GlfwSubsystemConfiguration.java
@@ -17,11 +17,11 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw;
+package de.staropensource.sosengine.windowing.glfw;
import de.staropensource.sosengine.base.classes.Configuration;
import de.staropensource.sosengine.base.utility.PropertiesReader;
-import de.staropensource.sosengine.graphics.glfw.types.GlfwPlatform;
+import de.staropensource.sosengine.windowing.glfw.types.GlfwPlatform;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -58,7 +58,7 @@ public final class GlfwSubsystemConfiguration extends Configuration {
* @since v1-alpha0
*/
@Getter
- private final @NotNull String group = "sosengine.graphics.glfw.";
+ private final @NotNull String group = "sosengine.windowing.glfw.";
/**
* Contains the platform GLFW will try to initialize with.
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/callbacks/KeyCallback.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/callbacks/KeyCallback.java
similarity index 95%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/callbacks/KeyCallback.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/callbacks/KeyCallback.java
index e2b2490a..a9020f51 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/callbacks/KeyCallback.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/callbacks/KeyCallback.java
@@ -17,13 +17,13 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw.callbacks;
+package de.staropensource.sosengine.windowing.glfw.callbacks;
-import de.staropensource.sosengine.graphics.classes.Window;
-import de.staropensource.sosengine.graphics.events.InputEvent;
-import de.staropensource.sosengine.graphics.glfw.classes.WindowCallback;
-import de.staropensource.sosengine.graphics.types.input.Key;
-import de.staropensource.sosengine.graphics.types.input.KeyState;
+import de.staropensource.sosengine.windowing.classes.Window;
+import de.staropensource.sosengine.windowing.events.InputEvent;
+import de.staropensource.sosengine.windowing.glfw.classes.WindowCallback;
+import de.staropensource.sosengine.windowing.types.input.Key;
+import de.staropensource.sosengine.windowing.types.input.KeyState;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.glfw.GLFWKeyCallbackI;
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/callbacks/MouseButtonCallback.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/callbacks/MouseButtonCallback.java
similarity index 88%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/callbacks/MouseButtonCallback.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/callbacks/MouseButtonCallback.java
index 5bda0f33..95c6d33b 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/callbacks/MouseButtonCallback.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/callbacks/MouseButtonCallback.java
@@ -17,13 +17,13 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw.callbacks;
+package de.staropensource.sosengine.windowing.glfw.callbacks;
-import de.staropensource.sosengine.graphics.classes.Window;
-import de.staropensource.sosengine.graphics.events.InputEvent;
-import de.staropensource.sosengine.graphics.glfw.classes.WindowCallback;
-import de.staropensource.sosengine.graphics.types.input.Key;
-import de.staropensource.sosengine.graphics.types.input.KeyState;
+import de.staropensource.sosengine.windowing.classes.Window;
+import de.staropensource.sosengine.windowing.events.InputEvent;
+import de.staropensource.sosengine.windowing.glfw.classes.WindowCallback;
+import de.staropensource.sosengine.windowing.types.input.Key;
+import de.staropensource.sosengine.windowing.types.input.KeyState;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.glfw.GLFWMouseButtonCallbackI;
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/callbacks/package-info.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/callbacks/package-info.java
similarity index 93%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/callbacks/package-info.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/callbacks/package-info.java
index 65e4f8e8..d8ffc15f 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/callbacks/package-info.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/callbacks/package-info.java
@@ -22,4 +22,4 @@
*
* @since v1-alpha2
*/
-package de.staropensource.sosengine.graphics.glfw.callbacks;
+package de.staropensource.sosengine.windowing.glfw.callbacks;
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwInternalClass.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwInternalClass.java
similarity index 89%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwInternalClass.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwInternalClass.java
index 2257e613..11b68d62 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwInternalClass.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwInternalClass.java
@@ -17,12 +17,12 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw.classes;
+package de.staropensource.sosengine.windowing.glfw.classes;
import de.staropensource.sosengine.base.logging.LoggerInstance;
-import de.staropensource.sosengine.graphics.classes.Monitor;
-import de.staropensource.sosengine.graphics.classes.api.ApiInternalClass;
-import de.staropensource.sosengine.graphics.exceptions.NoMonitorsFoundException;
+import de.staropensource.sosengine.windowing.classes.Monitor;
+import de.staropensource.sosengine.windowing.classes.api.ApiInternalClass;
+import de.staropensource.sosengine.windowing.exceptions.NoMonitorsFoundException;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.PointerBuffer;
@@ -33,7 +33,7 @@ import java.util.LinkedHashSet;
import static org.lwjgl.glfw.GLFW.glfwGetMonitors;
/**
- * The internal API class for GLFW-powered Graphics APIs.
+ * The internal API class for GLFW-powered windowing APIs.
*
* @since v1-alpha2
*/
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwManagementClass.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwManagementClass.java
similarity index 89%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwManagementClass.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwManagementClass.java
index b16a7e29..3e4a27f4 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwManagementClass.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwManagementClass.java
@@ -17,13 +17,13 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw.classes;
+package de.staropensource.sosengine.windowing.glfw.classes;
import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.utility.Miscellaneous;
-import de.staropensource.sosengine.graphics.classes.api.ApiManagementClass;
-import de.staropensource.sosengine.graphics.classes.Window;
-import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException;
+import de.staropensource.sosengine.windowing.classes.api.ApiManagementClass;
+import de.staropensource.sosengine.windowing.classes.Window;
+import de.staropensource.sosengine.windowing.exceptions.NotOnMainThreadException;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
@@ -32,7 +32,7 @@ import java.util.*;
import static org.lwjgl.glfw.GLFW.*;
/**
- * The abstract management class for GLFW-powered Graphics APIs.
+ * The abstract management class for GLFW-powered windowing APIs.
*
* @since v1-alpha2
*/
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwMonitor.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwMonitor.java
similarity index 94%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwMonitor.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwMonitor.java
index 618089f4..1cf9c0f1 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwMonitor.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwMonitor.java
@@ -17,11 +17,11 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw.classes;
+package de.staropensource.sosengine.windowing.glfw.classes;
import de.staropensource.sosengine.base.types.vectors.Vec2i;
-import de.staropensource.sosengine.graphics.classes.Monitor;
-import de.staropensource.sosengine.graphics.exceptions.InvalidMonitorException;
+import de.staropensource.sosengine.windowing.classes.Monitor;
+import de.staropensource.sosengine.windowing.exceptions.InvalidMonitorException;
import lombok.SneakyThrows;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.glfw.GLFWVidMode;
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwWindow.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwWindow.java
similarity index 92%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwWindow.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwWindow.java
index 94f7b9da..0975523b 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwWindow.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/GlfwWindow.java
@@ -17,23 +17,23 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw.classes;
+package de.staropensource.sosengine.windowing.glfw.classes;
import de.staropensource.sosengine.base.exceptions.UnexpectedThrowableException;
import de.staropensource.sosengine.base.types.Tristate;
import de.staropensource.sosengine.base.types.vectors.Vec2i;
import de.staropensource.sosengine.base.utility.Miscellaneous;
-import de.staropensource.sosengine.graphics.GraphicsSubsystemConfiguration;
-import de.staropensource.sosengine.graphics.classes.Monitor;
-import de.staropensource.sosengine.graphics.classes.Window;
-import de.staropensource.sosengine.graphics.events.GraphicsApiErrorEvent;
-import de.staropensource.sosengine.graphics.events.InputEvent;
-import de.staropensource.sosengine.graphics.glfw.callbacks.KeyCallback;
-import de.staropensource.sosengine.graphics.glfw.callbacks.MouseButtonCallback;
-import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException;
-import de.staropensource.sosengine.graphics.exceptions.WindowCreationFailureException;
-import de.staropensource.sosengine.graphics.types.window.VsyncMode;
-import de.staropensource.sosengine.graphics.types.window.WindowMode;
+import de.staropensource.sosengine.windowing.WindowingSubsystemConfiguration;
+import de.staropensource.sosengine.windowing.classes.Monitor;
+import de.staropensource.sosengine.windowing.classes.Window;
+import de.staropensource.sosengine.windowing.events.RenderingErrorEvent;
+import de.staropensource.sosengine.windowing.events.InputEvent;
+import de.staropensource.sosengine.windowing.glfw.callbacks.KeyCallback;
+import de.staropensource.sosengine.windowing.glfw.callbacks.MouseButtonCallback;
+import de.staropensource.sosengine.windowing.exceptions.NotOnMainThreadException;
+import de.staropensource.sosengine.windowing.exceptions.WindowCreationFailureException;
+import de.staropensource.sosengine.windowing.types.window.VsyncMode;
+import de.staropensource.sosengine.windowing.types.window.WindowMode;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.glfw.GLFWKeyCallback;
@@ -47,7 +47,7 @@ import java.util.Objects;
import static org.lwjgl.glfw.GLFW.*;
/**
- * Abstract class for implementing GLFW-powered windows in a Graphics API.
+ * Abstract class for implementing GLFW-powered windows in a windowing API.
*
* @since v1-alpha2
*/
@@ -98,7 +98,7 @@ public abstract class GlfwWindow extends Window {
* @param onTop on top flag
* @param transparent transparency flag
* @param rendering rendering flag
- * @throws UnexpectedThrowableException stuff thrown by the {@link #initializeWindow()} and {@link #render()} methods of the implementing Graphics API
+ * @throws UnexpectedThrowableException stuff thrown by the {@link #initializeWindow()} and {@link #render()} methods of the implementing windowing API
* @since v1-alpha2
*/
protected GlfwWindow(@NotNull String name, @NotNull String title, @NotNull Vec2i size, @NotNull Vec2i minimumSize, @NotNull Vec2i maximumSize, @NotNull Vec2i position, @NotNull WindowMode windowMode, @NotNull Monitor monitor, boolean resizable, boolean borderless, boolean focusable, boolean onTop, boolean transparent, boolean rendering) throws UnexpectedThrowableException {
@@ -113,7 +113,7 @@ public abstract class GlfwWindow extends Window {
}
/**
- * Allows the Graphics API to initialize the window.
+ * Allows the windowing API to initialize the window.
*
* @throws Throwable throwable
* @since v1-alpha2
@@ -152,7 +152,7 @@ public abstract class GlfwWindow extends Window {
// Create window
long identifier = glfwCreateWindow(getSize().getX(), getSize().getY(), getTitle(), MemoryUtil.NULL, MemoryUtil.NULL);
if (identifier == MemoryUtil.NULL) {
- new GraphicsApiErrorEvent().callEvent("Unable to create window: Identifier is null");
+ new RenderingErrorEvent().callEvent("Unable to create window: Identifier is null");
throw new WindowCreationFailureException();
}
@@ -164,7 +164,7 @@ public abstract class GlfwWindow extends Window {
ownContext();
// Set swap interval based on V-Sync mode setting
- glfwSwapInterval(GraphicsSubsystemConfiguration.getInstance().getVsyncMode() == VsyncMode.ON ? 1 : 0);
+ glfwSwapInterval(WindowingSubsystemConfiguration.getInstance().getVsyncMode() == VsyncMode.ON ? 1 : 0);
// Create callbacks
keyCallback = GLFWKeyCallback.create(new KeyCallback(this));
@@ -182,7 +182,7 @@ public abstract class GlfwWindow extends Window {
}
/**
- * Allows the Graphics API to set custom
+ * Allows the windowing API to set custom
* window hints during window creation.
*
* @since v1-alpha2
@@ -270,12 +270,12 @@ public abstract class GlfwWindow extends Window {
super.setOnTop(Miscellaneous.getBooleanizedInteger(glfwGetWindowAttrib(identifierLong, GLFW_FLOATING)));
super.setTransparent(Miscellaneous.getBooleanizedInteger(glfwGetWindowAttrib(identifierLong, GLFW_TRANSPARENT_FRAMEBUFFER)));
- // Make Graphics API update it's state
+ // Make windowing API update it's state
updateGlfwState();
}
/**
- * Allows the Graphics API to update it's state.
+ * Allows the windowing API to update it's state.
*
* @throws Throwable throwable
* @since v1-alpha2
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/WindowCallback.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/WindowCallback.java
similarity index 93%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/WindowCallback.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/WindowCallback.java
index 4112157d..8183e22e 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/WindowCallback.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/WindowCallback.java
@@ -17,9 +17,9 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw.classes;
+package de.staropensource.sosengine.windowing.glfw.classes;
-import de.staropensource.sosengine.graphics.classes.Window;
+import de.staropensource.sosengine.windowing.classes.Window;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/package-info.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/package-info.java
similarity index 90%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/package-info.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/package-info.java
index 61b4b2e2..2f947630 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/package-info.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/classes/package-info.java
@@ -20,6 +20,6 @@
/**
* Interfaces and abstract classes which can be used for implementing classes.
*
- * These are not to be confused with data types. See {@link de.staropensource.sosengine.graphics.glfw.types}.
+ * These are not to be confused with data types. See {@link de.staropensource.sosengine.windowing.glfw.types}.
*/
-package de.staropensource.sosengine.graphics.glfw.classes;
+package de.staropensource.sosengine.windowing.glfw.classes;
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/GlfwInitializationException.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/exceptions/GlfwInitializationException.java
similarity index 94%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/GlfwInitializationException.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/exceptions/GlfwInitializationException.java
index bc5dbde9..f2934bee 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/GlfwInitializationException.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/exceptions/GlfwInitializationException.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw.exceptions;
+package de.staropensource.sosengine.windowing.glfw.exceptions;
/**
* Thrown when GLFW fails to initialize.
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/package-info.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/exceptions/package-info.java
similarity index 93%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/package-info.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/exceptions/package-info.java
index e4b8ddec..93697519 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/package-info.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/exceptions/package-info.java
@@ -22,4 +22,4 @@
*
* @since v1-alpha2
*/
-package de.staropensource.sosengine.graphics.glfw.exceptions;
+package de.staropensource.sosengine.windowing.glfw.exceptions;
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/package-info.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/package-info.java
similarity index 94%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/package-info.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/package-info.java
index e3ac2313..c7cc9264 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/package-info.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/package-info.java
@@ -22,4 +22,4 @@
*
* @since v1-alpha2
*/
-package de.staropensource.sosengine.graphics.glfw;
+package de.staropensource.sosengine.windowing.glfw;
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/types/GlfwPlatform.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/types/GlfwPlatform.java
similarity index 96%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/types/GlfwPlatform.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/types/GlfwPlatform.java
index e1a819ed..84694d7f 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/types/GlfwPlatform.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/types/GlfwPlatform.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.glfw.types;
+package de.staropensource.sosengine.windowing.glfw.types;
/**
* Contains all available platforms which GLFW can be initialized with.
diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/types/package-info.java b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/types/package-info.java
similarity index 94%
rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/types/package-info.java
rename to windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/types/package-info.java
index 50e1d4c0..d5616fcd 100644
--- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/types/package-info.java
+++ b/windowing/glfw/src/main/java/de/staropensource/sosengine/windowing/glfw/types/package-info.java
@@ -22,4 +22,4 @@
*
* @since v1-alpha2
*/
-package de.staropensource.sosengine.graphics.glfw.types;
+package de.staropensource.sosengine.windowing.glfw.types;
diff --git a/windowing/glfw/src/main/java/module-info.java b/windowing/glfw/src/main/java/module-info.java
new file mode 100644
index 00000000..0508fc67
--- /dev/null
+++ b/windowing/glfw/src/main/java/module-info.java
@@ -0,0 +1,29 @@
+import de.staropensource.sosengine.windowing.classes.Window;
+
+/**
+ * The {@code glfw} subsystem and windowing API, which makes it
+ * possible to create {@link Window} using the GLFW library.
+ *
+ * @since v1-alpha4
+ */
+module sosengine.windowing.glfw {
+ // Dependencies
+ // -> Subsystems
+ requires transitive sosengine.base;
+ requires transitive sosengine.windowing;
+ // -> Libraries
+ requires transitive static lombok;
+ requires transitive org.jetbrains.annotations;
+ requires org.lwjgl;
+ requires org.lwjgl.glfw;
+
+ // API access
+ exports de.staropensource.sosengine.windowing.glfw;
+ exports de.staropensource.sosengine.windowing.glfw.classes;
+ exports de.staropensource.sosengine.windowing.glfw.exceptions;
+
+ // Reflection access
+ opens de.staropensource.sosengine.windowing.glfw;
+ opens de.staropensource.sosengine.windowing.glfw.classes;
+ opens de.staropensource.sosengine.windowing.glfw.exceptions;
+}
diff --git a/graphics/glfw/src/main/javadoc/overview.html b/windowing/glfw/src/main/javadoc/overview.html
similarity index 100%
rename from graphics/glfw/src/main/javadoc/overview.html
rename to windowing/glfw/src/main/javadoc/overview.html
diff --git a/graphics/glfw/src/main/javadoc/theme.css b/windowing/glfw/src/main/javadoc/theme.css
similarity index 100%
rename from graphics/glfw/src/main/javadoc/theme.css
rename to windowing/glfw/src/main/javadoc/theme.css
diff --git a/graphics/gradle b/windowing/gradle
similarity index 100%
rename from graphics/gradle
rename to windowing/gradle
diff --git a/graphics/gradlew b/windowing/gradlew
similarity index 100%
rename from graphics/gradlew
rename to windowing/gradlew
diff --git a/graphics/gradlew.bat b/windowing/gradlew.bat
similarity index 100%
rename from graphics/gradlew.bat
rename to windowing/gradlew.bat
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/GraphicsSubsystem.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/WindowingSubsystem.java
similarity index 65%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/GraphicsSubsystem.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/WindowingSubsystem.java
index 99b76a4c..5b04508a 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/GraphicsSubsystem.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/WindowingSubsystem.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics;
+package de.staropensource.sosengine.windowing;
import de.staropensource.sosengine.base.annotations.EngineSubsystem;
import de.staropensource.sosengine.base.annotations.EventListener;
@@ -30,11 +30,11 @@ import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.DependencyVector;
import de.staropensource.sosengine.base.utility.ListFormatter;
import de.staropensource.sosengine.base.utility.Miscellaneous;
-import de.staropensource.sosengine.graphics.classes.api.ApiClass;
-import de.staropensource.sosengine.graphics.events.GraphicsApiErrorEvent;
-import de.staropensource.sosengine.graphics.events.GraphicsApiShutdownEvent;
-import de.staropensource.sosengine.graphics.events.GraphicsErrorEvent;
-import de.staropensource.sosengine.graphics.events.InputEvent;
+import de.staropensource.sosengine.windowing.classes.api.ApiClass;
+import de.staropensource.sosengine.windowing.events.RenderingErrorEvent;
+import de.staropensource.sosengine.windowing.events.WindowingShutdownEvent;
+import de.staropensource.sosengine.windowing.events.WindowingErrorEvent;
+import de.staropensource.sosengine.windowing.events.InputEvent;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
@@ -44,13 +44,13 @@ import java.util.List;
import java.util.Map;
/**
- * The main class of the Graphics subsystem.
+ * The main class of the windowing subsystem.
*
* @since v1-alpha0
*/
@EngineSubsystem
@SuppressWarnings({ "JavadocDeclaration" })
-public final class GraphicsSubsystem extends SubsystemClass {
+public final class WindowingSubsystem extends SubsystemClass {
/**
* Contains the class instance.
*
@@ -62,17 +62,17 @@ public final class GraphicsSubsystem extends SubsystemClass {
* @since v1-alpha0
*/
@Getter
- private static GraphicsSubsystem instance = null;
+ private static WindowingSubsystem instance = null;
/**
- * Contains a list of all registered Graphics APIs.
+ * Contains a list of all registered windowing APIs.
*
* @see ApiClass
* @since v1-alpha0
* -- GETTER --
- * Returns a list of all registered Graphics APIs.
+ * Returns a list of all registered windowing APIs.
*
- * @return list of all registered Graphics APIs
+ * @return list of all registered windowing APIs
* @see ApiClass
* @since v1-alpha0
*/
@@ -80,14 +80,14 @@ public final class GraphicsSubsystem extends SubsystemClass {
private final @NotNull Map<@NotNull String, @NotNull ApiClass> registeredApis = new HashMap<>();
/**
- * Contains a reference to the active Graphics API main class.
+ * Contains a reference to the active windowing API main class.
*
* @see ApiClass
* @since v1-alpha0
* -- GETTER --
- * Returns a reference to the active Graphics API main class.
+ * Returns a reference to the active windowing API main class.
*
- * @return Graphics API main class reference
+ * @return windowing API main class reference
* @see ApiClass
* @since v1-alpha0
*/
@@ -99,7 +99,7 @@ public final class GraphicsSubsystem extends SubsystemClass {
*
* @since v1-alpha0
*/
- public GraphicsSubsystem() {
+ public WindowingSubsystem() {
// Only allow one instance
if (instance == null)
instance = this;
@@ -110,31 +110,31 @@ public final class GraphicsSubsystem extends SubsystemClass {
/** {@inheritDoc} */
@Override
public @NotNull String getName() {
- return "graphics";
+ return "windowing";
}
/** {@inheritDoc} */
@Override
public void initializeSubsystem() {
- // Initialize GraphicsSubsystemConfiguration and load it
- new GraphicsSubsystemConfiguration().loadConfiguration();
+ // Initialize WindowingSubsystemConfiguration and load it
+ new WindowingSubsystemConfiguration().loadConfiguration();
// Precompute event listeners
cacheEvents();
// Warn about subsystem and API instability
- logger.warn("The graphics subsystem is experimental. Subsystem and API stability are not guaranteed.");
+ logger.warn("The windowing subsystem is experimental. Subsystem and API stability are not guaranteed.");
}
/**
- * Caches all graphics subsystem events.
+ * Caches all windowing subsystem events.
*
* @since v1-alpha0
*/
public static void cacheEvents() {
- EventHelper.cacheEvent(GraphicsApiErrorEvent.class);
- EventHelper.cacheEvent(GraphicsApiShutdownEvent.class);
- EventHelper.cacheEvent(GraphicsErrorEvent.class);
+ EventHelper.cacheEvent(RenderingErrorEvent.class);
+ EventHelper.cacheEvent(WindowingShutdownEvent.class);
+ EventHelper.cacheEvent(WindowingErrorEvent.class);
EventHelper.cacheEvent(InputEvent.class);
}
@@ -142,7 +142,7 @@ public final class GraphicsSubsystem extends SubsystemClass {
@Override
public @NotNull DependencyVector getDependencyVector() {
return new DependencyVector.Builder()
- .setIdentifier("graphics")
+ .setIdentifier(getName())
.setVersioningSystem(StarOpenSourceVersioningSystem.class)
.setVersion(EngineInformation.getVersioningString())
.build();
@@ -160,7 +160,7 @@ public final class GraphicsSubsystem extends SubsystemClass {
logger.verb("Shutting down");
long shutdownTime = Miscellaneous.measureExecutionTime(() -> {
- new GraphicsApiShutdownEvent().callEvent();
+ new WindowingShutdownEvent().callEvent();
if (instance.api != null)
instance.api.shutdownApi();
@@ -170,13 +170,13 @@ public final class GraphicsSubsystem extends SubsystemClass {
}
/**
- * Registers a Graphics API.
+ * Registers a windowing API.
*
- * @param mainClass main class of the Graphics API
+ * @param mainClass main class of the windowing API
* @since v1-alpha0
*/
- public void registerGraphicsApi(@NotNull ApiClass mainClass) {
- logger.verb("Registering Graphics API " + mainClass.getApiName() + " (" + mainClass.getClass().getName() + ")");
+ public void registerApi(@NotNull ApiClass mainClass) {
+ logger.verb("Registering windowing API " + mainClass.getApiName() + " (" + mainClass.getClass().getName() + ")");
Object[] output = Miscellaneous.getMapValues(registeredApis, mainClass).toArray();
@@ -185,14 +185,14 @@ public final class GraphicsSubsystem extends SubsystemClass {
}
/**
- * Chooses a Graphics API to use automatically based on hardware support.
+ * Chooses a windowing API to use automatically based on hardware support.
*
- * @return if a compatible Graphics API has been chosen
- * @see #setGraphicsApi(String)
+ * @return if a compatible windowing API has been chosen
+ * @see #setApi(String)
* @since v1-alpha0
*/
- public boolean setGraphicsApi() {
- logger.verb("Choosing a compatible Graphics API");
+ public boolean setApi() {
+ logger.verb("Choosing a compatible windowing API");
List<@NotNull String> compatibleApis = new ArrayList<>();
@@ -205,7 +205,7 @@ public final class GraphicsSubsystem extends SubsystemClass {
logger.diag(apiName + " is incompatible with this system");
if (compatibleApis.isEmpty()) {
- logger.error("No compatible Graphics API was found");
+ logger.error("No compatible windowing API was found");
return false;
} else if (compatibleApis.size() == 1)
logger.diag("Compatible is " + compatibleApis.getFirst());
@@ -215,10 +215,10 @@ public final class GraphicsSubsystem extends SubsystemClass {
// Choose last item in list.
api = registeredApis.get(compatibleApis.getLast());
try {
- logger.diag("Initializing Graphics API");
- logger.diag("Initialized Graphics API in " + Miscellaneous.measureExecutionTime(() -> api.initializeApi()) + "ms");
+ logger.diag("Initializing windowing API");
+ logger.diag("Initialized windowing API in " + Miscellaneous.measureExecutionTime(() -> api.initializeApi()) + "ms");
} catch (Throwable throwable) {
- logger.crash("Graphics API failed to initialize", throwable, true);
+ logger.crash("windowing API failed to initialize", throwable, true);
throw throwable;
}
@@ -226,27 +226,27 @@ public final class GraphicsSubsystem extends SubsystemClass {
}
/**
- * Sets the Graphics API to use.
+ * Sets the windowing API to use.
*
- * @param name name of the Graphics API
- * @return if the Graphics API has been found
- * @see #setGraphicsApi()
+ * @param name name of the windowing API
+ * @return if the windowing API has been found
+ * @see #setApi()
* @since v1-alpha0
*/
- public boolean setGraphicsApi(@NotNull String name) {
+ public boolean setApi(@NotNull String name) {
if (!registeredApis.containsKey(name))
return false;
- logger.verb("Setting Graphics API " + name);
+ logger.verb("Setting windowing API " + name);
if (api == null)
api = registeredApis.get(name);
else
- logger.crash("Unable to set Graphics API: Graphics API " + api.getApiName() + " already registered");
+ logger.crash("Unable to set windowing API: windowing API " + api.getApiName() + " already registered");
// Initialize API
- logger.diag("Initializing Graphics API " + api.getApiName());
- logger.diag("Initialized Graphics API " + api.getApiName() + " in " + Miscellaneous.measureExecutionTime(() -> api.initializeApi()) + "ms");
+ logger.diag("Initializing windowing API " + api.getApiName());
+ logger.diag("Initialized windowing API " + api.getApiName() + " in " + Miscellaneous.measureExecutionTime(() -> api.initializeApi()) + "ms");
return true;
}
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/GraphicsSubsystemConfiguration.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/WindowingSubsystemConfiguration.java
similarity index 76%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/GraphicsSubsystemConfiguration.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/WindowingSubsystemConfiguration.java
index d8aa7bf0..0cbda15a 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/GraphicsSubsystemConfiguration.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/WindowingSubsystemConfiguration.java
@@ -17,24 +17,25 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics;
+package de.staropensource.sosengine.windowing;
import de.staropensource.sosengine.base.classes.Configuration;
import de.staropensource.sosengine.base.utility.PropertiesReader;
-import de.staropensource.sosengine.graphics.events.GraphicsErrorEvent;
-import de.staropensource.sosengine.graphics.types.window.VsyncMode;
+import de.staropensource.sosengine.windowing.events.RenderingErrorEvent;
+import de.staropensource.sosengine.windowing.events.WindowingErrorEvent;
+import de.staropensource.sosengine.windowing.types.window.VsyncMode;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
- * Provides the Graphics subsystem configuration.
+ * Provides the windowing subsystem configuration.
*
* @since v1-alpha0
*/
@Getter
@SuppressWarnings({ "JavadocDeclaration" })
-public final class GraphicsSubsystemConfiguration extends Configuration {
+public final class WindowingSubsystemConfiguration extends Configuration {
/**
* Contains the class instance.
*
@@ -42,11 +43,11 @@ public final class GraphicsSubsystemConfiguration extends Configuration {
* -- GETTER --
* Returns the class instance.
*
- * @return class instance unless {@link GraphicsSubsystem} is uninitialized
+ * @return class instance unless {@link WindowingSubsystem} is uninitialized
* @since v1-alpha0
*/
@Getter
- private static GraphicsSubsystemConfiguration instance;
+ private static WindowingSubsystemConfiguration instance;
/**
* Defines the group every property must start with to be recognized as a subsystem configuration setting.
@@ -59,10 +60,10 @@ public final class GraphicsSubsystemConfiguration extends Configuration {
* @since v1-alpha0
*/
@Getter
- public final @NotNull String group = "sosengine.graphics.";
+ public final @NotNull String group = "sosengine.windowing.";
/**
- * If enabled, allows for unintentional behaviour and excess logging.
+ * If enabled, allows for unintentional behaviour and excess logging.
* Unless you want to debug or work on a sensitive part of the subsystem, don't enable this!
*
* @since v1-alpha0
@@ -70,7 +71,7 @@ public final class GraphicsSubsystemConfiguration extends Configuration {
* Gets the value for {@link #debug}.
*
* @return variable value
- * @see GraphicsSubsystemConfiguration#debug
+ * @see WindowingSubsystemConfiguration#debug
* @since v1-alpha0
*/
private boolean debug;
@@ -83,7 +84,7 @@ public final class GraphicsSubsystemConfiguration extends Configuration {
* Gets the value for {@link #debugInput}.
*
* @return variable value
- * @see GraphicsSubsystemConfiguration#debugInput
+ * @see WindowingSubsystemConfiguration#debugInput
* @since v1-alpha2
*/
private boolean debugInput;
@@ -103,18 +104,32 @@ public final class GraphicsSubsystemConfiguration extends Configuration {
private boolean debugFrames;
/**
- * If enabled, graphical errors thrown by GLFW will be printed to the log by the subsystem.
+ * Causes windowing errors will be logged, if enabled.
*
- * @see GraphicsErrorEvent
- * @since v1-alpha0
+ * @see WindowingErrorEvent
+ * @since v1-alpha4
* -- GETTER --
- * Gets the value for {@link #errorGraphicsError}.
+ * Gets the value for {@link #errorWindowingFailure}.
*
* @return variable value
- * @see GraphicsSubsystemConfiguration#errorGraphicsError
- * @since v1-alpha0
+ * @see WindowingSubsystemConfiguration#errorWindowingFailure
+ * @since v1-alpha4
*/
- private boolean errorGraphicsError;
+ private boolean errorWindowingFailure;
+
+ /**
+ * Causes rendering errors will be logged, if enabled.
+ *
+ * @see RenderingErrorEvent
+ * @since v1-alpha4
+ * -- GETTER --
+ * Gets the value for {@link #errorRenderingFailure}.
+ *
+ * @return variable value
+ * @see WindowingSubsystemConfiguration#errorRenderingFailure
+ * @since v1-alpha4
+ */
+ private boolean errorRenderingFailure;
/**
* Contains how many frames can be rendered per second.
@@ -152,10 +167,10 @@ public final class GraphicsSubsystemConfiguration extends Configuration {
/**
* Constructs this class.
*
- * @see GraphicsSubsystem
+ * @see WindowingSubsystem
* @since v1-alpha0
*/
- public GraphicsSubsystemConfiguration() {
+ public WindowingSubsystemConfiguration() {
super("ENGINE"); // TODO Wait for flexible constructor bodies (JEP 482) to be implemented into the JVM as a stable feature. We don't want to use preview features in production code.
// Only allow one instance
@@ -175,7 +190,8 @@ public final class GraphicsSubsystemConfiguration extends Configuration {
case "debugInput" -> debugInput = parser.getBoolean(group + property);
case "debugFrames" -> debugFrames = parser.getBoolean(group + property);
- case "errorGraphicsError" -> errorGraphicsError = parser.getBoolean(group + property);
+ case "errorWindowingFailure" -> errorWindowingFailure = parser.getBoolean(group + property);
+ case "errorRenderingFailure" -> errorRenderingFailure = parser.getBoolean(group + property);
case "vsyncMode" -> {
try {
@@ -205,7 +221,8 @@ public final class GraphicsSubsystemConfiguration extends Configuration {
debugInput = false;
debugFrames = false;
- errorGraphicsError = true;
+ errorWindowingFailure = true;
+ errorRenderingFailure = true;
vsyncMode = VsyncMode.ON;
maximumFramesPerSecond = 60;
@@ -219,7 +236,8 @@ public final class GraphicsSubsystemConfiguration extends Configuration {
case "debugInput" -> { return debugInput; }
case "debugFrames" -> { return debugFrames; }
- case "errorGraphicsError" -> { return errorGraphicsError; }
+ case "errorWindowingFailure" -> { return errorWindowingFailure; }
+ case "errorRenderingFailure" -> { return errorRenderingFailure; }
case "vsyncMode" -> { return vsyncMode; }
case "maximumFramesPerSecond" -> { return maximumFramesPerSecond; }
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Monitor.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/Monitor.java
similarity index 85%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Monitor.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/classes/Monitor.java
index 8471a7fd..65cfba0f 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Monitor.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/Monitor.java
@@ -17,13 +17,13 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.classes;
+package de.staropensource.sosengine.windowing.classes;
import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.vectors.Vec2i;
-import de.staropensource.sosengine.graphics.GraphicsSubsystem;
-import de.staropensource.sosengine.graphics.exceptions.InvalidMonitorException;
-import de.staropensource.sosengine.graphics.exceptions.NoMonitorsFoundException;
+import de.staropensource.sosengine.windowing.WindowingSubsystem;
+import de.staropensource.sosengine.windowing.exceptions.InvalidMonitorException;
+import de.staropensource.sosengine.windowing.exceptions.NoMonitorsFoundException;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
@@ -33,7 +33,7 @@ import java.util.LinkedHashSet;
import java.util.UUID;
/**
- * Abstract class for implementing monitors in a Graphics API.
+ * Abstract class for implementing monitors in a windowing API.
*
* Note that monitors stop working unannounced when disconnected,
* call {@link #isConnected()} before using to avoid unexpected behaviour.
@@ -77,20 +77,20 @@ public abstract class Monitor {
/**
* Contains the monitor identifier.
*
- * This identifier is used by the Graphics API to refer to a monitor and may change during runtime.
+ * This identifier is used by the windowing API to refer to a monitor and may change during runtime.
*
* @since v1-alpha1
* -- GETTER --
* Returns the monitor identifier.
*
- * This identifier is used by the Graphics API to refer to a monitor and may change during runtime.
+ * This identifier is used by the windowing API to refer to a monitor and may change during runtime.
*
* @return monitor identifier
* @since v1-alpha2
* -- SETTER --
* Sets the monitor identifier.
*
- * This identifier is used by the Graphics API to refer to a monitor and may change during runtime.
+ * This identifier is used by the windowing API to refer to a monitor and may change during runtime.
*
* @param identifier new monitor identifier
* @since v1-alpha2
@@ -115,7 +115,7 @@ public abstract class Monitor {
* @since v1-alpha2
*/
public static @NotNull LinkedHashSet<@NotNull Monitor> getMonitors() throws NoMonitorsFoundException {
- return GraphicsSubsystem.getInstance().getApi().getInternalApi().getMonitors();
+ return WindowingSubsystem.getInstance().getApi().getInternalApi().getMonitors();
}
/**
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Window.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/Window.java
similarity index 96%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Window.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/classes/Window.java
index ec1dbd56..17e2cd64 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/Window.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/Window.java
@@ -17,14 +17,14 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.classes;
+package de.staropensource.sosengine.windowing.classes;
import de.staropensource.sosengine.base.exceptions.UnexpectedThrowableException;
import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.Tristate;
import de.staropensource.sosengine.base.types.vectors.Vec2i;
-import de.staropensource.sosengine.graphics.GraphicsSubsystem;
-import de.staropensource.sosengine.graphics.types.window.WindowMode;
+import de.staropensource.sosengine.windowing.WindowingSubsystem;
+import de.staropensource.sosengine.windowing.types.window.WindowMode;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
@@ -36,7 +36,7 @@ import java.util.Set;
import java.util.UUID;
/**
- * Abstract class for implementing windows in a Graphics API.
+ * Abstract class for implementing windows in a windowing API.
*
* Note that many window properties may be overridden by any
* window manager or compositor. Make sure to poll for changes
@@ -107,20 +107,20 @@ public abstract class Window implements AutoCloseable {
/**
* Contains the window identifier.
*
- * This identifier is used by the Graphics API to refer to a window and may change during runtime.
+ * This identifier is used by the windowing API to refer to a window and may change during runtime.
*
* @since v1-alpha1
* -- GETTER --
* Returns the window identifier.
*
- * This identifier is used by the Graphics API to refer to a window and may change during runtime.
+ * This identifier is used by the windowing API to refer to a window and may change during runtime.
*
* @return window identifier
* @since v1-alpha2
* -- SETTER --
* Sets the window identifier.
*
- * This identifier is used by the Graphics API to refer to a window and may change during runtime.
+ * This identifier is used by the windowing API to refer to a window and may change during runtime.
*
* @param identifier new window identifier
* @since v1-alpha2
@@ -417,14 +417,14 @@ public abstract class Window implements AutoCloseable {
/**
* Enables or disables transparency support for this window.
*
- * Availability depends on the Graphics API, compositor or
+ * Availability depends on the windowing API, compositor or
* window manager and potentially system settings.
*
* @since v1-alpha2
* -- GETTER --
* Returns if the window can be transparent.
*
- * Availability depends on the Graphics API, compositor or
+ * Availability depends on the windowing API, compositor or
* window manager and potentially system settings.
*
* @return transparency flag state
@@ -432,7 +432,7 @@ public abstract class Window implements AutoCloseable {
* -- SETTER --
* Sets if the window can be transparent.
*
- * Availability depends on the Graphics API, compositor or
+ * Availability depends on the windowing API, compositor or
* window manager and potentially system settings.
*
* @param transparent new transparency flag state
@@ -486,7 +486,7 @@ public abstract class Window implements AutoCloseable {
* @param onTop on top flag
* @param transparent transparency flag
* @param rendering rendering flag
- * @throws UnexpectedThrowableException stuff thrown by the {@link #initializeWindow()} and {@link #render()} methods of the implementing Graphics API
+ * @throws UnexpectedThrowableException stuff thrown by the {@link #initializeWindow()} and {@link #render()} methods of the implementing windowing API
* @since v1-alpha2
*/
protected Window(@NotNull String name, @NotNull String title, @NotNull Vec2i size, @NotNull Vec2i minimumSize, @NotNull Vec2i maximumSize, @NotNull Vec2i position, @NotNull WindowMode windowMode, @NotNull Monitor monitor, boolean resizable, boolean borderless, boolean focusable, boolean onTop, boolean transparent, boolean rendering) throws UnexpectedThrowableException {
@@ -511,7 +511,7 @@ public abstract class Window implements AutoCloseable {
logger.diag("Creating new window with properties: uniqueIdentifier=" + uniqueIdentifier + " name=\"" + name + "\" title=\"" + title + "\" size=" + size + " minimumSize=" + minimumSize + " maximumSize=" + maximumSize + " position=" + position + " windowMode=" + windowMode + " monitor=" + monitor.getUniqueIdentifier() + " (" + monitor.getName() + ") resizable=" + resizable + " borderless=" + borderless + " focusable=" + focusable + " onTop=" + onTop + " transparent=" + transparent + " rendering=" + rendering);
try {
- // Allow Graphics API to initialize window
+ // Allow windowing API to initialize window
initializeWindow();
// Update state and render first image
@@ -526,7 +526,7 @@ public abstract class Window implements AutoCloseable {
}
/**
- * Allows the Graphics API to initialize the window.
+ * Allows the windowing API to initialize the window.
*
* NEVER place any code in the constructor. Instead, write
* API-specific window initialization code in here
@@ -791,7 +791,7 @@ public abstract class Window implements AutoCloseable {
// Create new Window instance
try {
- return GraphicsSubsystem.getInstance().getApi().getInternalApi().getWindowClass()
+ return WindowingSubsystem.getInstance().getApi().getInternalApi().getWindowClass()
.getDeclaredConstructor(String.class, String.class, Vec2i.class, Vec2i.class, Vec2i.class, Vec2i.class, WindowMode.class, Monitor.class, Boolean.TYPE, Boolean.TYPE, Boolean.TYPE, Boolean.TYPE, Boolean.TYPE, Boolean.TYPE)
.newInstance(name, title, size, minimumSize, maximumSize, position, windowMode, monitor, resizableBoolean, borderlessBoolean, focusableBoolean, onTopBoolean, transparentBoolean, renderingBoolean);
} catch (Throwable throwable) {
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/ApiClass.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/ApiClass.java
similarity index 69%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/ApiClass.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/ApiClass.java
index 1f352ed5..906ccfe7 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/ApiClass.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/ApiClass.java
@@ -17,16 +17,14 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.classes.api;
+package de.staropensource.sosengine.windowing.classes.api;
import de.staropensource.sosengine.base.Engine;
-import de.staropensource.sosengine.base.annotations.EventListener;
import de.staropensource.sosengine.base.classes.SubsystemClass;
-import de.staropensource.sosengine.graphics.events.GraphicsErrorEvent;
import org.jetbrains.annotations.NotNull;
/**
- * The interface for Graphics API main classes.
+ * The interface for windowing API main classes.
*
* @since v1-alpha0
*/
@@ -39,14 +37,14 @@ public abstract class ApiClass extends SubsystemClass {
public ApiClass() {}
/**
- * Initializes the Graphics API.
+ * Initializes the windowing API.
*
* @since v1-alpha0
*/
public abstract void initializeApi();
/**
- * Shuts the Graphics API down.
+ * Shuts the windowing API down.
*
* Called when the engine shuts down.
*
@@ -57,15 +55,15 @@ public abstract class ApiClass extends SubsystemClass {
public abstract void shutdownApi();
/**
- * Returns the name of the Graphics API.
+ * Returns the name of the windowing API.
*
- * @return Graphics API name
+ * @return windowing API name
* @since v1-alpha0
*/
public abstract String getApiName();
/**
- * Returns the Graphics API's internal API access class.
+ * Returns the windowing API's internal API access class.
*
* @return a {@link ApiInternalClass}
* @see ApiInternalClass
@@ -75,7 +73,7 @@ public abstract class ApiClass extends SubsystemClass {
public abstract ApiInternalClass getInternalApi();
/**
- * Returns the Graphics API's management class.
+ * Returns the windowing API's management class.
*
* @return a {@link ApiManagementClass}
* @see ApiManagementClass
@@ -85,20 +83,10 @@ public abstract class ApiClass extends SubsystemClass {
public abstract ApiManagementClass getManagement();
/**
- * Checks if the Graphics API is compatible with the underlying hardware.
+ * Checks if the windowing API is compatible with the underlying hardware.
*
- * @return if the Graphics API is compatible
+ * @return if the windowing API is compatible
* @since v1-alpha0
*/
public abstract boolean isCompatible();
-
- /**
- * Called when a graphics error occurs.
- *
- * @param error graphics error
- * @since v1-alpha0
- */
- @EventListener(event = GraphicsErrorEvent.class)
- @SuppressWarnings({ "unused" })
- public static void onGraphicsError(String error) {}
}
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/ApiInternalClass.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/ApiInternalClass.java
similarity index 76%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/ApiInternalClass.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/ApiInternalClass.java
index 4007b966..0705bda5 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/ApiInternalClass.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/ApiInternalClass.java
@@ -17,23 +17,23 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.classes.api;
+package de.staropensource.sosengine.windowing.classes.api;
-import de.staropensource.sosengine.graphics.classes.Monitor;
-import de.staropensource.sosengine.graphics.classes.Window;
-import de.staropensource.sosengine.graphics.exceptions.NoMonitorsFoundException;
+import de.staropensource.sosengine.windowing.classes.Monitor;
+import de.staropensource.sosengine.windowing.classes.Window;
+import de.staropensource.sosengine.windowing.exceptions.NoMonitorsFoundException;
import org.jetbrains.annotations.NotNull;
import java.util.LinkedHashSet;
/**
- * The interface for internal API access, used by the Graphics subsystem.
+ * The interface for internal API access, used by the windowing subsystem.
*
* @since v1-alpha2
*/
public interface ApiInternalClass {
/**
- * Returns the {@link Window} class of the Graphics API.
+ * Returns the {@link Window} class of the windowing API.
*
* @return {@link Window} class
* @since v1-alpha2
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/ApiManagementClass.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/ApiManagementClass.java
similarity index 86%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/ApiManagementClass.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/ApiManagementClass.java
index 54064fa3..be6b2a61 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/ApiManagementClass.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/ApiManagementClass.java
@@ -17,14 +17,14 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.classes.api;
+package de.staropensource.sosengine.windowing.classes.api;
import de.staropensource.sosengine.base.logging.LoggerInstance;
import de.staropensource.sosengine.base.utility.Math;
import de.staropensource.sosengine.base.utility.Miscellaneous;
-import de.staropensource.sosengine.graphics.GraphicsSubsystemConfiguration;
-import de.staropensource.sosengine.graphics.classes.Window;
-import de.staropensource.sosengine.graphics.types.window.VsyncMode;
+import de.staropensource.sosengine.windowing.WindowingSubsystemConfiguration;
+import de.staropensource.sosengine.windowing.classes.Window;
+import de.staropensource.sosengine.windowing.types.window.VsyncMode;
import lombok.AccessLevel;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
@@ -34,7 +34,7 @@ import java.util.LinkedList;
import java.util.concurrent.atomic.AtomicReference;
/**
- * The interface for Graphics API management classes.
+ * The interface for windowing API management classes.
*
* @since v1-alpha0
*/
@@ -61,9 +61,9 @@ public abstract class ApiManagementClass {
public ApiManagementClass() {}
/**
- * Returns if this Graphics API must be interacted with on the main thread.
+ * Returns if this windowing API must be interacted with on the main thread.
*
- * @return {@code true} if Graphics API must be interacted with on the main thread, {@code false} otherwise
+ * @return {@code true} if windowing API must be interacted with on the main thread, {@code false} otherwise
* @since v1-alpha2
*/
public abstract boolean mustRunOnMainThread();
@@ -103,17 +103,17 @@ public abstract class ApiManagementClass {
frameCode.run();
});
- if (GraphicsSubsystemConfiguration.getInstance().getVsyncMode() != VsyncMode.OFF)
+ if (WindowingSubsystemConfiguration.getInstance().getVsyncMode() != VsyncMode.OFF)
// V-Sync is enabled, no need for manual busy waiting
sleepDuration = 0L;
else
// Calculate amount of time the thread should spend sleeping
- sleepDuration = (long) (1d / GraphicsSubsystemConfiguration.getInstance().getMaximumFramesPerSecond() * 1000d) - renderTime;
+ sleepDuration = (long) (1d / WindowingSubsystemConfiguration.getInstance().getMaximumFramesPerSecond() * 1000d) - renderTime;
// Add render and sleep time to list used for calculating the delta time value
splitDeltaTime.add(renderTime + sleepDuration);
// Busy wait unless V-Sync is enabled
- if (GraphicsSubsystemConfiguration.getInstance().getVsyncMode() == VsyncMode.OFF)
+ if (WindowingSubsystemConfiguration.getInstance().getVsyncMode() == VsyncMode.OFF)
try {
//noinspection BusyWait // true, true, but there's no other way to do it
Thread.sleep(sleepDuration);
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/package-info.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/package-info.java
similarity index 93%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/package-info.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/package-info.java
index b12619b7..04b9a986 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/api/package-info.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/api/package-info.java
@@ -22,4 +22,4 @@
*
* @since v1-alpha2
*/
-package de.staropensource.sosengine.graphics.classes.api;
+package de.staropensource.sosengine.windowing.classes.api;
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/package-info.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/package-info.java
similarity index 91%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/classes/package-info.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/classes/package-info.java
index 053c62ab..185596f8 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/package-info.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/classes/package-info.java
@@ -20,8 +20,8 @@
/**
* Interfaces and abstract classes which can be used for implementing classes.
*
- * These are not to be confused with data types. See {@link de.staropensource.sosengine.graphics.types}.
+ * These are not to be confused with data types. See {@link de.staropensource.sosengine.windowing.types}.
*
* @since v1-alpha0
*/
-package de.staropensource.sosengine.graphics.classes;
+package de.staropensource.sosengine.windowing.classes;
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/InputEvent.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/InputEvent.java
similarity index 84%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/events/InputEvent.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/events/InputEvent.java
index e45e6f25..659cc4f9 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/InputEvent.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/InputEvent.java
@@ -17,15 +17,15 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.events;
+package de.staropensource.sosengine.windowing.events;
import de.staropensource.sosengine.base.classes.Event;
import de.staropensource.sosengine.base.classes.helpers.EventHelper;
import de.staropensource.sosengine.base.logging.LoggerInstance;
-import de.staropensource.sosengine.graphics.GraphicsSubsystemConfiguration;
-import de.staropensource.sosengine.graphics.classes.Window;
-import de.staropensource.sosengine.graphics.types.input.Key;
-import de.staropensource.sosengine.graphics.types.input.KeyState;
+import de.staropensource.sosengine.windowing.WindowingSubsystemConfiguration;
+import de.staropensource.sosengine.windowing.classes.Window;
+import de.staropensource.sosengine.windowing.types.input.Key;
+import de.staropensource.sosengine.windowing.types.input.KeyState;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -61,13 +61,13 @@ public final class InputEvent implements Event {
/**
* Emits the event and calls all event listeners.
*
- * @param window window the input originated from. May be {@code null}, depending on the Graphics API
+ * @param window window the input originated from. May be {@code null}, depending on the windowing API
* @param key key
* @param state key state
* @since v1-alpha0
*/
public void callEvent(@Nullable Window window, @NotNull Key key, @NotNull KeyState state) {
- if (GraphicsSubsystemConfiguration.getInstance().isDebugInput())
+ if (WindowingSubsystemConfiguration.getInstance().isDebugInput())
logger.diag("Got input event: window=" + (window == null ? "\\" : window.getUniqueIdentifier()) + " key=" + key.name() + " state=" + state.name());
EventHelper.invokeAnnotatedMethods(getClass(), window, key, state);
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/GraphicsApiErrorEvent.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/RenderingErrorEvent.java
similarity index 85%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/events/GraphicsApiErrorEvent.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/events/RenderingErrorEvent.java
index 3994f1c5..4b330fe1 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/GraphicsApiErrorEvent.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/RenderingErrorEvent.java
@@ -17,24 +17,24 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.events;
+package de.staropensource.sosengine.windowing.events;
import de.staropensource.sosengine.base.classes.Event;
import de.staropensource.sosengine.base.classes.helpers.EventHelper;
import org.jetbrains.annotations.NotNull;
/**
- * Called when a graphics error occurs.
+ * Called when an error occurs in the renderer API (e.g. OpenGL, Vulkan).
*
* @since v1-alpha0
*/
-public final class GraphicsApiErrorEvent implements Event {
+public final class RenderingErrorEvent implements Event {
/**
* Constructs this class.
*
* @since v1-alpha0
*/
- public GraphicsApiErrorEvent() {}
+ public RenderingErrorEvent() {}
/**
* {@inheritDoc}
@@ -48,7 +48,7 @@ public final class GraphicsApiErrorEvent implements Event {
/**
* Emits the event and calls all event listeners.
*
- * @param error graphics error
+ * @param error error description
* @since v1-alpha0
*/
public void callEvent(@NotNull String error) {
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/GraphicsErrorEvent.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/WindowingErrorEvent.java
similarity index 86%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/events/GraphicsErrorEvent.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/events/WindowingErrorEvent.java
index 714a5291..01bf79b5 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/GraphicsErrorEvent.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/WindowingErrorEvent.java
@@ -17,24 +17,24 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.events;
+package de.staropensource.sosengine.windowing.events;
import de.staropensource.sosengine.base.classes.Event;
import de.staropensource.sosengine.base.classes.helpers.EventHelper;
import org.jetbrains.annotations.NotNull;
/**
- * Called when a graphics error occurs.
+ * Called when an error occurs in the windowing API.
*
* @since v1-alpha0
*/
-public final class GraphicsErrorEvent implements Event {
+public final class WindowingErrorEvent implements Event {
/**
* Constructs this class.
*
* @since v1-alpha0
*/
- public GraphicsErrorEvent() {}
+ public WindowingErrorEvent() {}
/**
* {@inheritDoc}
@@ -49,7 +49,7 @@ public final class GraphicsErrorEvent implements Event {
/**
* Emits the event and calls all event listeners.
*
- * @param error graphics error
+ * @param error error description
* @since v1-alpha0
*/
public void callEvent(@NotNull String error) {
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/GraphicsApiShutdownEvent.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/WindowingShutdownEvent.java
similarity index 85%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/events/GraphicsApiShutdownEvent.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/events/WindowingShutdownEvent.java
index 9cca4a92..16015872 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/GraphicsApiShutdownEvent.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/WindowingShutdownEvent.java
@@ -17,23 +17,23 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.events;
+package de.staropensource.sosengine.windowing.events;
import de.staropensource.sosengine.base.classes.Event;
import de.staropensource.sosengine.base.classes.helpers.EventHelper;
/**
- * Called when the Graphics API shuts down.
+ * Called when the windowing API shuts down.
*
* @since v1-alpha0
*/
-public final class GraphicsApiShutdownEvent implements Event {
+public final class WindowingShutdownEvent implements Event {
/**
* Constructs this class.
*
* @since v1-alpha0
*/
- public GraphicsApiShutdownEvent() {}
+ public WindowingShutdownEvent() {}
/** {@inheritDoc} */
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/package-info.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/package-info.java
similarity index 94%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/events/package-info.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/events/package-info.java
index be3016dc..acd73446 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/events/package-info.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/events/package-info.java
@@ -22,4 +22,4 @@
*
* @since v1-alpha0
*/
-package de.staropensource.sosengine.graphics.events;
+package de.staropensource.sosengine.windowing.events;
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/InvalidMonitorException.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/InvalidMonitorException.java
similarity index 95%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/InvalidMonitorException.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/InvalidMonitorException.java
index 925948e7..9ac334e5 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/InvalidMonitorException.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/InvalidMonitorException.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.exceptions;
+package de.staropensource.sosengine.windowing.exceptions;
/**
* Thrown when the specified monitor does not exist.
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NoMonitorsFoundException.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/NoMonitorsFoundException.java
similarity index 95%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NoMonitorsFoundException.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/NoMonitorsFoundException.java
index 06efd4c5..56ca5292 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NoMonitorsFoundException.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/NoMonitorsFoundException.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.exceptions;
+package de.staropensource.sosengine.windowing.exceptions;
/**
* Thrown when trying to access one or more monitors but none are found.
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NotOnMainThreadException.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/NotOnMainThreadException.java
similarity index 88%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NotOnMainThreadException.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/NotOnMainThreadException.java
index 7dcdbf56..f5e815e2 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NotOnMainThreadException.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/NotOnMainThreadException.java
@@ -17,10 +17,10 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.exceptions;
+package de.staropensource.sosengine.windowing.exceptions;
/**
- * Thrown when trying to communicate with a Graphics API over a non-main thread.
+ * Thrown when trying to communicate with a windowing API over a non-main thread.
*
* @since v1-alpha2
*/
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/WindowCreationFailureException.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/WindowCreationFailureException.java
similarity index 92%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/WindowCreationFailureException.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/WindowCreationFailureException.java
index fb58575a..47c64ede 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/WindowCreationFailureException.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/WindowCreationFailureException.java
@@ -17,9 +17,9 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.exceptions;
+package de.staropensource.sosengine.windowing.exceptions;
-import de.staropensource.sosengine.graphics.classes.Window;
+import de.staropensource.sosengine.windowing.classes.Window;
import org.jetbrains.annotations.NotNull;
/**
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/package-info.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/package-info.java
similarity index 81%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/package-info.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/package-info.java
index 19a49b32..de37ae28 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/package-info.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/exceptions/package-info.java
@@ -18,11 +18,11 @@
*/
/**
- * Exceptions for Graphics APIs.
+ * Exceptions for windowing APIs.
*
- * These aren't meant for the Graphics subsystem,
- * but instead for Graphics APIs, which may throw them.
+ * These aren't meant for the windowing subsystem,
+ * but instead for windowing APIs, which may throw them.
*
* @since v1-alpha2
*/
-package de.staropensource.sosengine.graphics.exceptions;
+package de.staropensource.sosengine.windowing.exceptions;
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/package-info.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/package-info.java
similarity index 91%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/package-info.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/package-info.java
index 41e709b7..5f296a4b 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/package-info.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/package-info.java
@@ -18,8 +18,8 @@
*/
/**
- * Code of the Graphics subsystem.
+ * Code of the windowing subsystem.
*
* @since v1-alpha0
*/
-package de.staropensource.sosengine.graphics;
+package de.staropensource.sosengine.windowing;
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/input/Key.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/input/Key.java
similarity index 99%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/types/input/Key.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/types/input/Key.java
index 808ffcfc..fc0305ed 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/input/Key.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/input/Key.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.types.input;
+package de.staropensource.sosengine.windowing.types.input;
/**
* Contains a list of keys which can be recognized by the engine.
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/input/KeyState.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/input/KeyState.java
similarity index 95%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/types/input/KeyState.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/types/input/KeyState.java
index c9f040b6..338af9e3 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/input/KeyState.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/input/KeyState.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.types.input;
+package de.staropensource.sosengine.windowing.types.input;
/**
* Contains in which state a key is.
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/input/package-info.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/input/package-info.java
similarity index 93%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/types/input/package-info.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/types/input/package-info.java
index 91e026fa..2ea2cd27 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/input/package-info.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/input/package-info.java
@@ -22,4 +22,4 @@
*
* @since v1-alpha2
*/
-package de.staropensource.sosengine.graphics.types.input;
+package de.staropensource.sosengine.windowing.types.input;
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/package-info.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/package-info.java
similarity index 94%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/types/package-info.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/types/package-info.java
index 492ccad1..8b8015e1 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/package-info.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/package-info.java
@@ -22,4 +22,4 @@
*
* @since v1-alpha1
*/
-package de.staropensource.sosengine.graphics.types;
+package de.staropensource.sosengine.windowing.types;
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/window/VsyncMode.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/window/VsyncMode.java
similarity index 86%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/types/window/VsyncMode.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/types/window/VsyncMode.java
index 5b78266a..b326fdcc 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/window/VsyncMode.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/window/VsyncMode.java
@@ -17,9 +17,9 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.types.window;
+package de.staropensource.sosengine.windowing.types.window;
-import de.staropensource.sosengine.graphics.GraphicsSubsystemConfiguration;
+import de.staropensource.sosengine.windowing.WindowingSubsystemConfiguration;
/**
* Controls how V-Sync operates.
@@ -30,7 +30,7 @@ public enum VsyncMode {
/**
* Disables V-Sync. The frame rate will be uncapped and will allow
* for processing an unlimited amount of frames (if not limited by
- * {@link GraphicsSubsystemConfiguration#maximumFramesPerSecond}).
+ * {@link WindowingSubsystemConfiguration#maximumFramesPerSecond}).
*
* @since v1-alpha1
*/
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/window/WindowMode.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/window/WindowMode.java
similarity index 97%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/types/window/WindowMode.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/types/window/WindowMode.java
index 62d9cd1c..dfa7e362 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/window/WindowMode.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/window/WindowMode.java
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-package de.staropensource.sosengine.graphics.types.window;
+package de.staropensource.sosengine.windowing.types.window;
/**
* Contains how a window should be displayed.
diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/window/package-info.java b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/window/package-info.java
similarity index 93%
rename from graphics/src/main/java/de/staropensource/sosengine/graphics/types/window/package-info.java
rename to windowing/src/main/java/de/staropensource/sosengine/windowing/types/window/package-info.java
index a5daa2b5..8b05e821 100644
--- a/graphics/src/main/java/de/staropensource/sosengine/graphics/types/window/package-info.java
+++ b/windowing/src/main/java/de/staropensource/sosengine/windowing/types/window/package-info.java
@@ -22,4 +22,4 @@
*
* @since v1-alpha1
*/
-package de.staropensource.sosengine.graphics.types.window;
+package de.staropensource.sosengine.windowing.types.window;
diff --git a/windowing/src/main/java/module-info.java b/windowing/src/main/java/module-info.java
new file mode 100644
index 00000000..a1f1c902
--- /dev/null
+++ b/windowing/src/main/java/module-info.java
@@ -0,0 +1,32 @@
+/**
+ * The {@code windowing} subsystem, which provides abstractions and
+ * APIs, which allow the creation and management of windows.
+ *
+ * @since v1-alpha4
+ */
+module sosengine.windowing {
+ // Dependencies
+ // -> Subsystems
+ requires transitive sosengine.base;
+ // -> Libraries
+ requires transitive static lombok;
+ requires transitive org.jetbrains.annotations;
+
+ // API access
+ exports de.staropensource.sosengine.windowing;
+ exports de.staropensource.sosengine.windowing.classes;
+ exports de.staropensource.sosengine.windowing.classes.api;
+ exports de.staropensource.sosengine.windowing.events;
+ exports de.staropensource.sosengine.windowing.exceptions;
+ exports de.staropensource.sosengine.windowing.types.input;
+ exports de.staropensource.sosengine.windowing.types.window;
+
+ // Reflection access
+ opens de.staropensource.sosengine.windowing;
+ opens de.staropensource.sosengine.windowing.classes;
+ opens de.staropensource.sosengine.windowing.classes.api;
+ opens de.staropensource.sosengine.windowing.events;
+ opens de.staropensource.sosengine.windowing.exceptions;
+ opens de.staropensource.sosengine.windowing.types.input;
+ opens de.staropensource.sosengine.windowing.types.window;
+}
diff --git a/graphics/opengl/src/main/javadoc/overview.html b/windowing/src/main/javadoc/overview.html
similarity index 76%
rename from graphics/opengl/src/main/javadoc/overview.html
rename to windowing/src/main/javadoc/overview.html
index 9883bd5b..c328d0b0 100644
--- a/graphics/opengl/src/main/javadoc/overview.html
+++ b/windowing/src/main/javadoc/overview.html
@@ -19,6 +19,6 @@
Welcome to the sos!engine API documentation!
- You are currently in the documentation for the opengl subsystem, allowing the OpenGL Graphics API to be used.
-This subsystem does not provide any utility for your application, as it just implements interfaces and classes from the graphics subsystem.
+ You are currently in the documentation for the windowing subsystem, which provides abstract APIs for creating and managing windows and monitors.
+This subsystem's interfaces are mainly useful for windowing APIs, creating implementations for them.
diff --git a/graphics/src/main/javadoc/theme.css b/windowing/src/main/javadoc/theme.css
similarity index 100%
rename from graphics/src/main/javadoc/theme.css
rename to windowing/src/main/javadoc/theme.css