Re-add setTitle() due to it needing to call a GLFW specific function.
This commit is contained in:
parent
ec65375271
commit
45e8b4ee49
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue