类 GlfwApplication

java.lang.Object
org.overrun.swgl.core.Application
org.overrun.swgl.core.GlfwApplication
所有已实现的接口:
AutoCloseable, Runnable, Mouse.Callback

public abstract class GlfwApplication extends Application
A swgl application implement by GLFW.
从以下版本开始:
0.1.0
作者:
squid233
  • 字段详细资料

    • window

      protected Window window
      The window.
    • keyboard

      protected Keyboard keyboard
      The keyboard.
    • mouse

      protected Mouse mouse
      The mouse.
    • timer

      protected Timer timer
      The timer.
    • frames

      protected int frames
      The frames per seconds.
    • resManager

      protected ResManager resManager
      The resource managers.
    • scheduledPerLoopTasks

      protected final List<Scheduler> scheduledPerLoopTasks
      The scheduled tasks executed per loop.
    • passedAppTicks

      protected int passedAppTicks
      The passed application ticks.
  • 构造器详细资料

    • GlfwApplication

      public GlfwApplication()
  • 方法详细资料

    • updateTime

      public void updateTime()
      Update the time and ticking.
    • createErrorCb

      public static org.lwjgl.glfw.GLFWErrorCallback createErrorCb(org.slf4j.Logger logger)
      Create the error callback to the logger.
      参数:
      logger - the logger
      返回:
      the error callback
      从以下版本开始:
      0.2.0
    • launch

      public void launch()
      Launch this application.
    • close

      public void close() throws Exception
      抛出:
      Exception
    • schedulePerLoop

      public void schedulePerLoop(int frequency, BooleanSupplier command)
      Scheduled tasks executed per loop.
      参数:
      frequency - The frequency in ticks.
      command - The command to be executed.
    • onKeyPress

      public void onKeyPress(int key, int scancode, int mods)
      Will be called when a key is pressed.
      参数:
      key - the keyboard key that was pressed
      scancode - the platform-specific scancode of the key
      mods - bitfield describing which modifiers keys were held down
    • onKeyRelease

      public void onKeyRelease(int key, int scancode, int mods)
      Will be called when a key is released.
      参数:
      key - the keyboard key that was released
      scancode - the platform-specific scancode of the key
      mods - bitfield describing which modifiers keys were held down
    • onKeyRepeat

      public void onKeyRepeat(int key, int scancode, int mods)
      Will be called when a key is repeated.
      参数:
      key - the keyboard key
      scancode - the platform-specific scancode of the key
      mods - bitfield describing which modifiers keys were held down
    • onMouseBtnPress

      public void onMouseBtnPress(int btn, int mods)
      Will be called when a mouse button is pressed.
      参数:
      btn - the mouse button that was pressed
      mods - bitfield describing which modifiers keys were held down
    • onMouseBtnRelease

      public void onMouseBtnRelease(int btn, int mods)
      Will be called when a mouse button is released.
      参数:
      btn - the mouse button that was released
      mods - bitfield describing which modifiers keys were held down
    • onScroll

      public void onScroll(double xoffset, double yoffset)
      Will be called when a scrolling device is used, such as a mouse wheel or scrolling area of a touchpad.
      参数:
      xoffset - the scroll offset along the x-axis
      yoffset - the scroll offset along the y-axis
    • onResize

      public void onResize(int width, int height)
      从类复制的说明: Application
      Called on resizing. You can update the viewport here.
      覆盖:
      onResize 在类中 Application
      参数:
      width - The new width.
      height - The new height.
    • settingFrames

      public void settingFrames()
      Called on setting frames.