Class DisplayManager

java.lang.Object
engine.display.DisplayManager

public class DisplayManager extends Object
This class contains all methods needed to set up, maintain and close a LWJGL display
  • Field Details

    • window

      public static long window
    • keyboard

      public static Keyboard keyboard
    • mouse

      public Mouse 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.