类 Application

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

public abstract class Application extends Object implements Runnable, AutoCloseable, Mouse.Callback
A swgl application.
从以下版本开始:
0.1.0
作者:
squid233
  • 构造器详细资料

    • Application

      public Application()
  • 方法详细资料

    • prepare

      public void prepare()
      Prepare starting argument here, like GlobalConfigs.
    • preStart

      public void preStart()
      Prepare starting argument here after initializing GLFW.
    • start

      public abstract void start()
      Initialize anything here, like GLProgram and Models.
    • postStart

      public void postStart()
      Initialize anything here, but after showing window.

      It can be instead of start(), if you want to show a progress bar, but you need to use multi-threads.

    • update

      public void update()
      Update anything per frames.
    • tick

      public void tick()
      Update physical things per ticks.
    • onResize

      public void onResize(int width, int height)
      Called on resizing. You can update the viewport here.
      参数:
      width - The new width.
      height - The new height.
    • onCursorPos

      public void onCursorPos(double x, double y, double xd, double yd)
      从接口复制的说明: Mouse.Callback
      Called on cursor pos changed.
      指定者:
      onCursorPos 在接口中 Mouse.Callback
      参数:
      x - The new pos x.
      y - The new pos y.
      xd - The delta pos x.
      yd - The delta pos y.
    • run

      public abstract void run()
      Update and render anything after ticking.
      指定者:
      run 在接口中 Runnable
    • postRun

      public void postRun()
      Called after running.
    • postClose

      public void postClose()
      Called at the last of the application.