From 45e8b4ee498b5127e02562bd086c0239c2ab1e27 Mon Sep 17 00:00:00 2001 From: okseby Date: Wed, 31 May 2023 15:01:44 -0400 Subject: [PATCH] Re-add setTitle() due to it needing to call a GLFW specific function. --- src/main/java/com/okseby/core/WindowManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/okseby/core/WindowManager.java b/src/main/java/com/okseby/core/WindowManager.java index d37d572..48f1faf 100644 --- a/src/main/java/com/okseby/core/WindowManager.java +++ b/src/main/java/com/okseby/core/WindowManager.java @@ -15,11 +15,11 @@ public class WindowManager { public static final float Z_NEAR = 0.01f; public static final float Z_FAR = 1000f; + @Getter private String title; @Getter private long window; @Getter private int width, height; @Getter private final Matrix4f projectionMatrix; - @Getter @Setter private String title; @Getter @Setter private boolean resizeable, vsync; public WindowManager(String title, int width, int height, boolean vsync) { @@ -115,6 +115,10 @@ public class WindowManager { return GLFW.glfwWindowShouldClose(window); } + public void setTitle(String title) { + GLFW.glfwSetWindowTitle(window, title); + } + public Matrix4f updateProjectionMatrix() { float aspectRatio = (float) width / height; return projectionMatrix.setPerspective(FOV, aspectRatio, Z_NEAR, Z_FAR);