Package com.jme3.system.lwjgl
Class LwjglAbstractDisplay
java.lang.Object
com.jme3.system.lwjgl.LwjglContext
com.jme3.system.lwjgl.LwjglAbstractDisplay
- All Implemented Interfaces:
com.jme3.system.JmeContext,Runnable
- Direct Known Subclasses:
LwjglCanvas,LwjglDisplay
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jme3.system.JmeContext
com.jme3.system.JmeContext.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected intprotected AtomicBooleanprotected booleanFields inherited from class com.jme3.system.lwjgl.LwjglContext
clContext, clPlatform, created, createdLock, joyInput, keyInput, listener, mouseInput, renderable, renderer, settings, THREAD_NAME, timer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected abstract voidcreateContext(com.jme3.system.AppSettings settings) Apply the settings, changing resolution, etc.protected voidDe-initialize in the OpenGL thread.voiddestroy(boolean waitFor) protected abstract voidDestroy the context.com.jme3.input.JoyInputcom.jme3.input.KeyInputcom.jme3.input.MouseInputcom.jme3.input.TouchInputabstract com.jme3.system.JmeContext.TypegetType()protected booleanDoes LWJGL display initialization in the OpenGL threadabstract voidrestart()Restart if it's a windowed or full-screen display.voidrun()protected voidrunLoop()execute one iteration of the render loop in the OpenGL threadvoidsetAutoFlushFrames(boolean enabled) abstract voidSet the title if it's a windowed displayMethods inherited from class com.jme3.system.lwjgl.LwjglContext
create, createContextAttribs, destroy, determineMaxSamples, getFramebufferHeight, getFramebufferWidth, getGLVersion, getNumSamplesToUse, getOpenCLContext, getRenderer, getSettings, getSystemListener, getTimer, getWindowXPosition, getWindowYPosition, initContextFirstTime, initOpenCL, internalCreate, internalDestroy, isCreated, isRenderable, loadNatives, printContextInitInfo, reinitContext, setSettings, setSystemListener, waitForMethods 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
-
Field Details
-
needClose
-
wasActive
protected boolean wasActive -
frameRate
protected int frameRate -
autoFlush
protected boolean autoFlush -
allowSwapBuffers
protected boolean allowSwapBuffers
-
-
Constructor Details
-
LwjglAbstractDisplay
public LwjglAbstractDisplay()
-
-
Method Details
-
getType
public abstract com.jme3.system.JmeContext.Type getType()- Specified by:
getTypein interfacecom.jme3.system.JmeContext- Returns:
- Type.Display or Type.Canvas
-
setTitle
Set the title if it's a windowed display- Specified by:
setTitlein interfacecom.jme3.system.JmeContext- Parameters:
title- the desired title
-
restart
public abstract void restart()Restart if it's a windowed or full-screen display.- Specified by:
restartin interfacecom.jme3.system.JmeContext
-
createContext
protected abstract void createContext(com.jme3.system.AppSettings settings) throws org.lwjgl.LWJGLException Apply the settings, changing resolution, etc.- Parameters:
settings- the AppSettings to apply- Throws:
org.lwjgl.LWJGLException- for various error conditions
-
destroyContext
protected abstract void destroyContext()Destroy the context. -
initInThread
protected boolean initInThread()Does LWJGL display initialization in the OpenGL thread- Returns:
- true if successful, otherwise false
-
checkGLError
protected boolean checkGLError() -
runLoop
protected void runLoop()execute one iteration of the render loop in the OpenGL thread -
deinitInThread
protected void deinitInThread()De-initialize in the OpenGL thread. -
run
public void run() -
getJoyInput
public com.jme3.input.JoyInput getJoyInput()- Specified by:
getJoyInputin interfacecom.jme3.system.JmeContext
-
getMouseInput
public com.jme3.input.MouseInput getMouseInput()- Specified by:
getMouseInputin interfacecom.jme3.system.JmeContext
-
getKeyInput
public com.jme3.input.KeyInput getKeyInput()- Specified by:
getKeyInputin interfacecom.jme3.system.JmeContext
-
getTouchInput
public com.jme3.input.TouchInput getTouchInput()- Specified by:
getTouchInputin interfacecom.jme3.system.JmeContext
-
setAutoFlushFrames
public void setAutoFlushFrames(boolean enabled) - Specified by:
setAutoFlushFramesin interfacecom.jme3.system.JmeContext
-
destroy
public void destroy(boolean waitFor) - Specified by:
destroyin interfacecom.jme3.system.JmeContext
-