Package bagel

Class Window

java.lang.Object
bagel.Window

public class Window extends Object
Represents the window the game is displayed in.
  • Method Details

    • getWidth

      public static int getWidth()
      Find the width of the window.
    • getHeight

      public static int getHeight()
      Find the height of the window.
    • close

      public static void close()
      Closes the current window, if one is open.
    • setClearColour

      public static void setClearColour(float r, float g, float b)
      Set the colour the screen is cleared to each frame. Arguments are floats where 0 is entirely dark in the channel and 1 is entirely bright in the channel.
    • setClearColour

      public static void setClearColour(double r, double g, double b)
      Overload of setClearColour(float, float, float) to easily support double literals.
    • removeFrameThrottle

      public static void removeFrameThrottle()
      Removes the throttle on the game's FPS. Should be used to work around certain platforms that have driver bugs resulting in poor performance.