diff --git a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlManagement.java b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlManagement.java index d657d8a..3a0714c 100644 --- a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlManagement.java +++ b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/OpenGlManagement.java @@ -19,10 +19,7 @@ package de.staropensource.sosengine.graphics.opengl; -import de.staropensource.sosengine.base.types.vectors.Vec2i; import de.staropensource.sosengine.graphics.classes.ApiManagementClass; -import de.staropensource.sosengine.graphics.opengl.classes.Window; -import org.jetbrains.annotations.NotNull; /** * The OpenGL API management class. @@ -37,9 +34,8 @@ public final class OpenGlManagement implements ApiManagementClass { public OpenGlManagement() {} /** {@inheritDoc} */ - @NotNull @Override - public Window createWindow(String title, Vec2i size) { - return new Window(title, size); + public boolean mustRunOnMainThread() { + return true; } } diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiManagementClass.java b/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiManagementClass.java index bd5719c..3194b09 100644 --- a/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiManagementClass.java +++ b/graphics/src/main/java/de/staropensource/sosengine/graphics/classes/ApiManagementClass.java @@ -19,9 +19,6 @@ package de.staropensource.sosengine.graphics.classes; -import de.staropensource.sosengine.base.types.vectors.Vec2i; -import org.jetbrains.annotations.NotNull; - /** * The interface for Graphics API management classes. * @@ -30,13 +27,10 @@ import org.jetbrains.annotations.NotNull; @SuppressWarnings({ "unused" }) public interface ApiManagementClass { /** - * Creates a new {@link Window}. + * Returns if this Graphics API must be interacted with on the main thread. * - * @param title initial window title - * @param size initial window size - * @return new window - * @since v1-alpha0 + * @return {@code true} if Graphics API must be interacted with on the main thread, {@code false} otherwise + * @since v1-alpha2 */ - @NotNull - Window createWindow(String title, Vec2i size); + boolean mustRunOnMainThread(); } 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 4ac355a..6f31bd1 100644 --- a/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java +++ b/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java @@ -111,7 +111,6 @@ public class Main { ApiManagementClass management = api.getManagement(); // Create window - management.createWindow("Test", new Vec2i(960, 540)); // Sleep for five seconds Thread.sleep(5000);