Package com.jme3.system.lwjgl
Class LwjglContext
java.lang.Object
com.jme3.system.lwjgl.LwjglContext
- All Implemented Interfaces:
com.jme3.system.JmeContext
- Direct Known Subclasses:
LwjglAbstractDisplay,LwjglOffscreenBuffer
A LWJGL implementation of a graphics context.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jme3.system.JmeContext
com.jme3.system.JmeContext.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LwjglContextprotected LwjglPlatformprotected AtomicBooleanprotected final Objectprotected JInputJoyInputprotected LwjglKeyInputprotected com.jme3.system.SystemListenerprotected LwjglMouseInputprotected AtomicBooleanprotected com.jme3.renderer.Rendererprotected com.jme3.system.AppSettingsprotected static final Stringprotected com.jme3.system.Timer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()protected org.lwjgl.opengl.ContextAttribsvoiddestroy()protected intdetermineMaxSamples(int requestedSamples) intReturns the height of the framebuffer.intReturns the width of the framebuffer.protected int[]getGLVersion(String renderer) protected intcom.jme3.opencl.Contextcom.jme3.renderer.Renderercom.jme3.system.AppSettingscom.jme3.system.SystemListenerAccesses the listener that receives events related to this context.com.jme3.system.TimergetTimer()intReturns the screen X coordinate of the left edge of the content area.intReturns the screen Y coordinate of the top edge of the content area.protected voidInitializes the LWJGL renderer and input for the first time.protected voidvoidvoidbooleanbooleanprotected voidprotected voidprotected voidReinitializes the relevant details of the context.voidsetSettings(com.jme3.system.AppSettings settings) voidsetSystemListener(com.jme3.system.SystemListener listener) protected voidwaitFor(boolean createdVal) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.system.JmeContext
create, destroy, getJoyInput, getKeyInput, getMouseInput, getTouchInput, getType, restart, setAutoFlushFrames, setTitle
-
Field Details
-
THREAD_NAME
- See Also:
-
created
-
renderable
-
createdLock
-
settings
protected com.jme3.system.AppSettings settings -
renderer
protected com.jme3.renderer.Renderer renderer -
keyInput
-
mouseInput
-
joyInput
-
timer
protected com.jme3.system.Timer timer -
listener
protected com.jme3.system.SystemListener listener -
clPlatform
-
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:
getSystemListenerin interfacecom.jme3.system.JmeContext- Returns:
- the pre-existing instance
-
setSystemListener
public void setSystemListener(com.jme3.system.SystemListener listener) - Specified by:
setSystemListenerin interfacecom.jme3.system.JmeContext
-
printContextInitInfo
protected void printContextInitInfo() -
getGLVersion
-
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:
isCreatedin interfacecom.jme3.system.JmeContext
-
isRenderable
public boolean isRenderable()- Specified by:
isRenderablein interfacecom.jme3.system.JmeContext
-
setSettings
public void setSettings(com.jme3.system.AppSettings settings) - Specified by:
setSettingsin interfacecom.jme3.system.JmeContext
-
getSettings
public com.jme3.system.AppSettings getSettings()- Specified by:
getSettingsin interfacecom.jme3.system.JmeContext
-
getRenderer
public com.jme3.renderer.Renderer getRenderer()- Specified by:
getRendererin interfacecom.jme3.system.JmeContext
-
getTimer
public com.jme3.system.Timer getTimer()- Specified by:
getTimerin interfacecom.jme3.system.JmeContext
-
getOpenCLContext
public com.jme3.opencl.Context getOpenCLContext()- Specified by:
getOpenCLContextin interfacecom.jme3.system.JmeContext
-
getFramebufferHeight
public int getFramebufferHeight()Returns the height of the framebuffer.- Specified by:
getFramebufferHeightin interfacecom.jme3.system.JmeContext- Returns:
- the height (in pixels)
-
getFramebufferWidth
public int getFramebufferWidth()Returns the width of the framebuffer.- Specified by:
getFramebufferWidthin interfacecom.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:
getWindowXPositionin interfacecom.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:
getWindowYPositionin interfacecom.jme3.system.JmeContext- Returns:
- the screen Y coordinate
-