Class LwjglContext

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

public abstract class LwjglContext extends Object implements com.jme3.system.JmeContext
A LWJGL implementation of a graphics context.
  • Field Details

    • THREAD_NAME

      protected static final String THREAD_NAME
      See Also:
    • created

      protected AtomicBoolean created
    • renderable

      protected AtomicBoolean renderable
    • createdLock

      protected final Object createdLock
    • settings

      protected com.jme3.system.AppSettings settings
    • renderer

      protected com.jme3.renderer.Renderer renderer
    • keyInput

      protected LwjglKeyInput keyInput
    • mouseInput

      protected LwjglMouseInput mouseInput
    • joyInput

      protected JInputJoyInput joyInput
    • timer

      protected com.jme3.system.Timer timer
    • listener

      protected com.jme3.system.SystemListener listener
    • clPlatform

      protected LwjglPlatform clPlatform
    • clContext

      protected LwjglContext clContext
  • Constructor Details

    • LwjglContext

      public LwjglContext()
  • Method Details

    • getSystemListener

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

      public void setSystemListener(com.jme3.system.SystemListener listener)
      Specified by:
      setSystemListener in interface com.jme3.system.JmeContext
    • printContextInitInfo

      protected void printContextInitInfo()
    • getGLVersion

      protected int[] getGLVersion(String renderer)
    • createContextAttribs

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

      protected int determineMaxSamples(int requestedSamples)
    • loadNatives

      protected void loadNatives()
    • getNumSamplesToUse

      protected int getNumSamplesToUse()
    • reinitContext

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

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

      protected void initOpenCL()
    • internalDestroy

      public void internalDestroy()
    • internalCreate

      public void internalCreate()
    • create

      public void create()
    • destroy

      public void destroy()
    • waitFor

      protected void waitFor(boolean createdVal)
    • isCreated

      public boolean isCreated()
      Specified by:
      isCreated in interface com.jme3.system.JmeContext
    • isRenderable

      public boolean isRenderable()
      Specified by:
      isRenderable in interface com.jme3.system.JmeContext
    • setSettings

      public void setSettings(com.jme3.system.AppSettings settings)
      Specified by:
      setSettings in interface com.jme3.system.JmeContext
    • getSettings

      public com.jme3.system.AppSettings getSettings()
      Specified by:
      getSettings in interface com.jme3.system.JmeContext
    • getRenderer

      public com.jme3.renderer.Renderer getRenderer()
      Specified by:
      getRenderer in interface com.jme3.system.JmeContext
    • getTimer

      public com.jme3.system.Timer getTimer()
      Specified by:
      getTimer in interface com.jme3.system.JmeContext
    • getOpenCLContext

      public com.jme3.opencl.Context getOpenCLContext()
      Specified by:
      getOpenCLContext in interface com.jme3.system.JmeContext
    • getFramebufferHeight

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

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

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

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