Package engine.display
Class DisplayManager
java.lang.Object
engine.display.DisplayManager
This class contains all methods needed to set up, maintain and close a LWJGL display
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Free the window callbacks Destroy the window Terminate GLFW and error callbackstatic void
Creates a display windows on which the game can be rendered.static float
static int
static int
static boolean
static void
resize()
static void
setHEIGHT
(int HEIGHT) static void
setRESIZED
(boolean RESIZED) static void
setWIDTH
(int WIDTH) static void
Updates the display every frame showing any changes made by the RenderEngine
-
Field Details
-
window
public static long window -
keyboard
-
mouse
-
-
Constructor Details
-
DisplayManager
public DisplayManager()
-
-
Method Details
-
createDisplay
public static void createDisplay()Creates a display windows on which the game can be rendered. Sets up the GLFW Properties needed to maintain the display as well as the size and other attributes such as v-sync GLFW: https://javadoc.lwjgl.org/org/lwjgl/glfw/GLFW.html -
isRESIZED
public static boolean isRESIZED() -
setRESIZED
public static void setRESIZED(boolean RESIZED) -
resize
public static void resize() -
setWIDTH
public static void setWIDTH(int WIDTH) -
setHEIGHT
public static void setHEIGHT(int HEIGHT) -
updateDisplay
public static void updateDisplay()Updates the display every frame showing any changes made by the RenderEngine -
getWindowWidth
public static int getWindowWidth()- Returns:
- window width
-
getWindowHeight
public static int getWindowHeight()- Returns:
- window height
-
closeDisplay
public static void closeDisplay()Free the window callbacks Destroy the window Terminate GLFW and error callback -
getFrameTimeSeconds
public static float getFrameTimeSeconds()- Returns:
- delta - time in between frames in seconds.
-