Package util

Class Engine

java.lang.Object
util.Engine

public final class Engine extends Object
  • Method Details

    • getInstance

      public static Engine getInstance()
      Get the global unique instance of the Engine object.
    • deltaTime

      public static float deltaTime()
    • updateDeltaTime

      public static void updateDeltaTime(float deltaTime)
    • isRunning

      public static boolean isRunning()
    • window

      public static Window window()
    • showWindow

      public static void showWindow()
    • scenes

      public static SceneManager scenes()
    • init

      public static void init(int windowWidth, int windowHeight, String windowTitle, float minSceneLighting)
      Start the engine, and initialize GLFW.
      Parameters:
      windowWidth - Width of the window to be created
      windowHeight - Height of the window to be created
      windowTitle - Title of the window to be created
      minSceneLighting - float from 0-1 indicating the minimum scene light level
    • init

      public static void init(int windowWidth, int windowHeight, String windowTitle)
      Start the engine, and initialize GLFW.
      Parameters:
      windowWidth - Width of the window to be created
      windowHeight - Height of the window to be created
      windowTitle - Title of the window to be created
    • init

      public static void init(String windowTitle, float minSceneLighting)
      Start the engine, and initialize GLFW. This will create a fullscreen window.
      Parameters:
      windowTitle - Title of the window to be created
      minSceneLighting - float from 0-1 indicating the minimum scene light level
    • init

      public static void init(int windowWidth, int windowHeight, String windowTitle, float minSceneLighting, boolean recalculateProjectionOnResize)
    • init

      public static void init(String windowTitle)
      Start the engine, and initialize GLFW.
      Parameters:
      windowTitle - Title of the window to be created
    • millisRunning

      public static double millisRunning()
      Returns:
      Returns the number of milliseconds since the engine started. (since the first call)
    • getWindow

      public Window getWindow()
    • getDeltaTime

      public float getDeltaTime()