Class LwjglContext

java.lang.Object
com.jme3.system.lwjgl.LwjglContext
All Implemented Interfaces:
JmeContext
Direct Known Subclasses:
LwjglAbstractDisplay, LwjglOffscreenBuffer, LwjglWindow

public abstract class LwjglContext extends Object implements JmeContext
A LWJGL implementation of a graphics context.
  • Field Details Link icon

  • Constructor Details Link icon

    • LwjglContext Link icon

      public LwjglContext()
  • Method Details Link icon

    • getSystemListener Link icon

      public SystemListener getSystemListener()
      Accesses the listener that receives events related to this context.
      Specified by:
      getSystemListener in interface JmeContext
      Returns:
      the pre-existing instance
    • setSystemListener Link icon

      public void setSystemListener(SystemListener listener)
      Description copied from interface: JmeContext
      Sets the listener that will receive events relating to context creation, update, and destroy.
      Specified by:
      setSystemListener in interface JmeContext
      Parameters:
      listener - the desired listener
    • printContextInitInfo Link icon

      protected void printContextInitInfo()
    • getGLVersion Link icon

      protected int[] getGLVersion(String renderer)
    • createContextAttribs Link icon

      protected org.lwjgl.opengl.ContextAttribs createContextAttribs()
    • determineMaxSamples Link icon

      protected int determineMaxSamples(int requestedSamples)
    • loadNatives Link icon

      protected void loadNatives()
    • getNumSamplesToUse Link icon

      protected int getNumSamplesToUse()
    • reinitContext Link icon

      protected void reinitContext()
      Reinitializes the relevant details of the context. For internal use only.
    • initContextFirstTime Link icon

      protected void initContextFirstTime()
      Initializes the LWJGL renderer and input for the first time. For internal use only.
    • initOpenCL Link icon

      protected void initOpenCL()
    • internalDestroy Link icon

      public void internalDestroy()
    • internalCreate Link icon

      public void internalCreate()
    • create Link icon

      public void create()
    • destroy Link icon

      public void destroy()
    • waitFor Link icon

      protected void waitFor(boolean createdVal)
    • isCreated Link icon

      public boolean isCreated()
      Specified by:
      isCreated in interface JmeContext
      Returns:
      True if the context has been created but not yet destroyed.
    • isRenderable Link icon

      public boolean isRenderable()
      Specified by:
      isRenderable in interface JmeContext
      Returns:
      True if the context contains a valid render surface, if any of the rendering methods in Renderer are called while this is false, then the result is undefined.
    • setSettings Link icon

      public void setSettings(AppSettings settings)
      Specified by:
      setSettings in interface JmeContext
      Parameters:
      settings - the display settings to use for the created context. If the context has already been created, then restart() must be called for the changes to be applied.
    • getSettings Link icon

      public AppSettings getSettings()
      Specified by:
      getSettings in interface JmeContext
      Returns:
      The current display settings. Note that they might be different from the ones set with setDisplaySettings() if the context was restarted or the settings changed internally.
    • getRenderer Link icon

      public Renderer getRenderer()
      Specified by:
      getRenderer in interface JmeContext
      Returns:
      The renderer for this context, or null if not created yet.
    • getTimer Link icon

      public Timer getTimer()
      Specified by:
      getTimer in interface JmeContext
      Returns:
      The timer for this context, or null if not created yet.
    • getOpenCLContext Link icon

      public Context getOpenCLContext()
      Specified by:
      getOpenCLContext in interface JmeContext
      Returns:
      The OpenCL context if available.
    • getFramebufferHeight Link icon

      public int getFramebufferHeight()
      Returns the height of the framebuffer.
      Specified by:
      getFramebufferHeight in interface JmeContext
      Returns:
      the height (in pixels)
    • getFramebufferWidth Link icon

      public int getFramebufferWidth()
      Returns the width of the framebuffer.
      Specified by:
      getFramebufferWidth in interface JmeContext
      Returns:
      the width (in pixels)
    • getWindowXPosition Link icon

      public int getWindowXPosition()
      Returns the screen X coordinate of the left edge of the content area.
      Specified by:
      getWindowXPosition in interface JmeContext
      Returns:
      the screen X coordinate
    • getWindowYPosition Link icon

      public int getWindowYPosition()
      Returns the screen Y coordinate of the top edge of the content area.
      Specified by:
      getWindowYPosition in interface JmeContext
      Returns:
      the screen Y coordinate