forked from StarOpenSource/Engine
Move a few exceptions from glfw to graphics subsystem
This commit is contained in:
parent
165e57083b
commit
45307ab842
8 changed files with 38 additions and 9 deletions
|
@ -30,7 +30,7 @@ import de.staropensource.sosengine.base.types.logging.LogIssuer;
|
||||||
import de.staropensource.sosengine.base.utility.Miscellaneous;
|
import de.staropensource.sosengine.base.utility.Miscellaneous;
|
||||||
import de.staropensource.sosengine.graphics.events.GraphicsErrorEvent;
|
import de.staropensource.sosengine.graphics.events.GraphicsErrorEvent;
|
||||||
import de.staropensource.sosengine.graphics.glfw.exceptions.GlfwInitializationException;
|
import de.staropensource.sosengine.graphics.glfw.exceptions.GlfwInitializationException;
|
||||||
import de.staropensource.sosengine.graphics.glfw.exceptions.NotOnMainThreadException;
|
import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.lwjgl.glfw.GLFWErrorCallback;
|
import org.lwjgl.glfw.GLFWErrorCallback;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import de.staropensource.sosengine.base.types.logging.LogIssuer;
|
||||||
import de.staropensource.sosengine.base.utility.Miscellaneous;
|
import de.staropensource.sosengine.base.utility.Miscellaneous;
|
||||||
import de.staropensource.sosengine.graphics.classes.api.ApiManagementClass;
|
import de.staropensource.sosengine.graphics.classes.api.ApiManagementClass;
|
||||||
import de.staropensource.sosengine.graphics.classes.Window;
|
import de.staropensource.sosengine.graphics.classes.Window;
|
||||||
import de.staropensource.sosengine.graphics.glfw.exceptions.NotOnMainThreadException;
|
import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ import de.staropensource.sosengine.graphics.events.GraphicsApiErrorEvent;
|
||||||
import de.staropensource.sosengine.graphics.events.InputEvent;
|
import de.staropensource.sosengine.graphics.events.InputEvent;
|
||||||
import de.staropensource.sosengine.graphics.glfw.callbacks.KeyCallback;
|
import de.staropensource.sosengine.graphics.glfw.callbacks.KeyCallback;
|
||||||
import de.staropensource.sosengine.graphics.glfw.callbacks.MouseButtonCallback;
|
import de.staropensource.sosengine.graphics.glfw.callbacks.MouseButtonCallback;
|
||||||
import de.staropensource.sosengine.graphics.glfw.exceptions.NotOnMainThreadException;
|
import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException;
|
||||||
import de.staropensource.sosengine.graphics.glfw.exceptions.WindowCreationFailureException;
|
import de.staropensource.sosengine.graphics.exceptions.WindowCreationFailureException;
|
||||||
import de.staropensource.sosengine.graphics.types.window.VsyncMode;
|
import de.staropensource.sosengine.graphics.types.window.VsyncMode;
|
||||||
import de.staropensource.sosengine.graphics.types.window.WindowMode;
|
import de.staropensource.sosengine.graphics.types.window.WindowMode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
|
@ -22,9 +22,8 @@ package de.staropensource.sosengine.graphics.opengl.classes;
|
||||||
import de.staropensource.sosengine.base.exceptions.UnexpectedThrowableException;
|
import de.staropensource.sosengine.base.exceptions.UnexpectedThrowableException;
|
||||||
import de.staropensource.sosengine.base.types.vectors.Vec2i;
|
import de.staropensource.sosengine.base.types.vectors.Vec2i;
|
||||||
import de.staropensource.sosengine.graphics.glfw.classes.GlfwWindow;
|
import de.staropensource.sosengine.graphics.glfw.classes.GlfwWindow;
|
||||||
import de.staropensource.sosengine.graphics.glfw.exceptions.NotOnMainThreadException;
|
import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException;
|
||||||
import de.staropensource.sosengine.graphics.glfw.exceptions.WindowCreationFailureException;
|
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.graphics.types.window.WindowMode;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.lwjgl.opengl.GL;
|
import org.lwjgl.opengl.GL;
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.staropensource.sosengine.graphics.exceptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Thrown when trying to get one or multiple monitors but none are found.
|
||||||
|
*
|
||||||
|
* @since v1-alpha2
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "unused" })
|
||||||
|
public final class NoMonitorsFoundException extends Exception {}
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package de.staropensource.sosengine.graphics.glfw.exceptions;
|
package de.staropensource.sosengine.graphics.exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thrown when trying to communicate with the Graphics API over a non-main thread.
|
* Thrown when trying to communicate with the Graphics API over a non-main thread.
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package de.staropensource.sosengine.graphics.glfw.exceptions;
|
package de.staropensource.sosengine.graphics.exceptions;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
|
@ -16,6 +16,7 @@ module sosengine.graphics {
|
||||||
exports de.staropensource.sosengine.graphics.classes;
|
exports de.staropensource.sosengine.graphics.classes;
|
||||||
exports de.staropensource.sosengine.graphics.classes.api;
|
exports de.staropensource.sosengine.graphics.classes.api;
|
||||||
exports de.staropensource.sosengine.graphics.events;
|
exports de.staropensource.sosengine.graphics.events;
|
||||||
|
exports de.staropensource.sosengine.graphics.exceptions;
|
||||||
exports de.staropensource.sosengine.graphics.types.input;
|
exports de.staropensource.sosengine.graphics.types.input;
|
||||||
exports de.staropensource.sosengine.graphics.types.window;
|
exports de.staropensource.sosengine.graphics.types.window;
|
||||||
|
|
||||||
|
@ -24,6 +25,7 @@ module sosengine.graphics {
|
||||||
opens de.staropensource.sosengine.graphics.classes;
|
opens de.staropensource.sosengine.graphics.classes;
|
||||||
opens de.staropensource.sosengine.graphics.classes.api;
|
opens de.staropensource.sosengine.graphics.classes.api;
|
||||||
opens de.staropensource.sosengine.graphics.events;
|
opens de.staropensource.sosengine.graphics.events;
|
||||||
|
opens de.staropensource.sosengine.graphics.exceptions;
|
||||||
opens de.staropensource.sosengine.graphics.types.input;
|
opens de.staropensource.sosengine.graphics.types.input;
|
||||||
opens de.staropensource.sosengine.graphics.types.window;
|
opens de.staropensource.sosengine.graphics.types.window;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue