This commit is contained in:
lieght
2025-09-17 19:39:08 +02:00
parent e906e812fa
commit a056171644
4 changed files with 61 additions and 125 deletions

View File

@@ -1,8 +1,7 @@
package org.toop;
import org.toop.core.*;
import org.toop.UI.GameSelectorWindow;
import org.toop.eventbus.*;
import org.toop.graphics.*;
import org.toop.server.backend.ServerManager;
import org.toop.server.frontend.ConnectionManager;
@@ -12,39 +11,40 @@ import org.apache.logging.log4j.LogManager;
import java.util.concurrent.ExecutionException;
public class Main {
private static final Logger logger = LogManager.getLogger(Main.class);
private static boolean running = false;
public static void main(String[] args) throws ExecutionException, InterruptedException {
initSystems();
registerEvents();
Window window = Window.setup(Window.API.GLFW, "Test", new Window.Size(1280, 720));
Renderer renderer = Renderer.setup(Renderer.API.OPENGL);
initSystems();
Logging.disableLogs();
// Window window = Window.setup(Window.API.GLFW, "Test", new Window.Size(1280, 720));
// Renderer renderer = Renderer.setup(Renderer.API.OPENGL);
// initSystems();
// Logging.disableLogs();
//
// Shader shader = Shader.create(
// "src/main/resources/shaders/gui_vertex.glsl",
// "src/main/resources/shaders/gui_fragment.glsl");
//
// running = window != null && renderer != null && shader != null;
// ConsoleGui console = new ConsoleGui();
//
// while (running) {
// window.update();
// renderer.clear();
//
// shader.start();
// renderer.render();
// }
// console.print();
//
// if (shader != null) shader.cleanup();
// if (renderer != null) renderer.cleanup();
// if (window != null) window.cleanup();
Shader shader = Shader.create(
"src/main/resources/shaders/gui_vertex.glsl",
"src/main/resources/shaders/gui_fragment.glsl");
running = window != null && renderer != null && shader != null;
ConsoleGui console = new ConsoleGui();
while (running) {
window.update();
renderer.clear();
shader.start();
renderer.render();
}
console.print();
}
if (shader != null) shader.cleanup();
if (renderer != null) renderer.cleanup();
if (window != null) window.cleanup();
*/
//JFrameWindow window = new JFrameWindow();
// JFrameWindow window = new JFrameWindow();
GameSelectorWindow gameSelectorWindow = new GameSelectorWindow();
}
@@ -74,3 +74,4 @@ public class Main {
Main.running = running;
}
}