Re-add setTitle() due to it needing to call a GLFW specific function.

This commit is contained in:
Sebastian Cabrera 2023-05-31 15:01:44 -04:00
parent ec65375271
commit 45e8b4ee49

View file

@ -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);