Package bagel
Class Window
java.lang.Object
bagel.Window
Represents the window the game is displayed in.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose()Closes the current window, if one is open.static intFind the height of the window.static intgetWidth()Find the width of the window.static voidRemoves the throttle on the game's FPS.static voidsetClearColour(double r, double g, double b) Overload ofsetClearColour(float, float, float)to easily support double literals.static voidsetClearColour(float r, float g, float b) Set the colour the screen is cleared to each frame.
-
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 ofsetClearColour(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.
-