1
0
Fork 0
This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
Modern-Game-Engine/src/mrdev023/opengl/DisplayMode.java
2015-12-23 18:38:34 +01:00

52 lines
996 B
Java

package mrdev023.opengl;
import static org.lwjgl.glfw.GLFW.*;
public class DisplayMode {
private int width = 0,height = 0;
private boolean fullscreen = false;
public DisplayMode(int width,int height){
this.width = width;
this.height = height;
}
public void setDisplayMode(DisplayMode displayMode){
this.width = displayMode.getWidth();
this.height = displayMode.getHeight();
this.fullscreen = displayMode.isFullscreen();
setDisplayMode();
}
public void setDisplayMode(){
glfwSetWindowSize(Display.getWindow(), width,height);
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public boolean isFullscreen() {
return fullscreen;
}
public void setFullscreen(boolean fullscreen) {
this.fullscreen = fullscreen;
setDisplayMode();
}
}