Class LwjglDisplay

All Implemented Interfaces:
JmeContext, Runnable

public class LwjglDisplay extends LwjglAbstractDisplay
  • Constructor Details

    • LwjglDisplay

      public LwjglDisplay()
  • Method Details

    • getFullscreenDisplayMode

      protected org.lwjgl.opengl.DisplayMode getFullscreenDisplayMode(int width, int height, int bpp, int freq)
      Parameters:
      width - The required display width
      height - The required display height
      bpp - The required bits per pixel. If -1 is passed it will return whatever bpp is found
      freq - The required frequency, if -1 is passed it will return whatever frequency is found
      Returns:
      The DisplayMode matches with specified settings or return null if no matching display mode is found
    • createContext

      protected void createContext(AppSettings settings) throws org.lwjgl.LWJGLException
      Description copied from class: LwjglAbstractDisplay
      Apply the settings, changing resolution, etc.
      Specified by:
      createContext in class LwjglAbstractDisplay
      Parameters:
      settings - the AppSettings to apply
      Throws:
      org.lwjgl.LWJGLException - for various error conditions
    • destroyContext

      protected void destroyContext()
      Description copied from class: LwjglAbstractDisplay
      Destroy the context.
      Specified by:
      destroyContext in class LwjglAbstractDisplay
    • create

      public void create(boolean waitFor)
      Description copied from interface: JmeContext
      Creates the context and makes it active.
      Parameters:
      waitFor - If true, will wait until context has initialized.
    • runLoop

      public void runLoop()
      Description copied from class: LwjglAbstractDisplay
      execute one iteration of the render loop in the OpenGL thread
      Overrides:
      runLoop in class LwjglAbstractDisplay
    • restart

      public void restart()
      Description copied from class: LwjglAbstractDisplay
      Restart if it's a windowed or full-screen display.
      Specified by:
      restart in interface JmeContext
      Specified by:
      restart in class LwjglAbstractDisplay
    • getType

      public JmeContext.Type getType()
      Specified by:
      getType in interface JmeContext
      Specified by:
      getType in class LwjglAbstractDisplay
      Returns:
      Type.Display or Type.Canvas
    • setTitle

      public void setTitle(String title)
      Description copied from class: LwjglAbstractDisplay
      Set the title if it's a windowed display
      Specified by:
      setTitle in interface JmeContext
      Specified by:
      setTitle in class LwjglAbstractDisplay
      Parameters:
      title - the desired title