Package com.jme3.system.lwjgl
Class LwjglDisplay
java.lang.Object
com.jme3.system.lwjgl.LwjglContext
com.jme3.system.lwjgl.LwjglAbstractDisplay
com.jme3.system.lwjgl.LwjglDisplay
- All Implemented Interfaces:
JmeContext,Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jme3.system.JmeContext
JmeContext.Type -
Field Summary
Fields inherited from class com.jme3.system.lwjgl.LwjglAbstractDisplay
allowSwapBuffers, autoFlush, frameRate, needClose, wasActiveFields 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 TypeMethodDescriptionvoidcreate(boolean waitFor) Creates the context and makes it active.protected voidcreateContext(AppSettings settings) Apply the settings, changing resolution, etc.protected voidDestroy the context.protected org.lwjgl.opengl.DisplayModegetFullscreenDisplayMode(int width, int height, int bpp, int freq) getType()voidrestart()Restart if it's a windowed or full-screen display.voidrunLoop()execute one iteration of the render loop in the OpenGL threadvoidSet the title if it's a windowed displayMethods inherited from class com.jme3.system.lwjgl.LwjglAbstractDisplay
checkGLError, deinitInThread, destroy, getJoyInput, getKeyInput, getMouseInput, getTouchInput, initInThread, run, setAutoFlushFramesMethods 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, waitFor
-
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 widthheight- The required display heightbpp- The required bits per pixel. If -1 is passed it will return whatever bpp is foundfreq- The required frequency, if -1 is passed it will return whatever frequency is found- Returns:
- The
DisplayModematches with specified settings or return null if no matching display mode is found
-
createContext
Description copied from class:LwjglAbstractDisplayApply the settings, changing resolution, etc.- Specified by:
createContextin classLwjglAbstractDisplay- Parameters:
settings- the AppSettings to apply- Throws:
org.lwjgl.LWJGLException- for various error conditions
-
destroyContext
protected void destroyContext()Description copied from class:LwjglAbstractDisplayDestroy the context.- Specified by:
destroyContextin classLwjglAbstractDisplay
-
create
public void create(boolean waitFor) Description copied from interface:JmeContextCreates the context and makes it active.- Parameters:
waitFor- If true, will wait until context has initialized.
-
runLoop
public void runLoop()Description copied from class:LwjglAbstractDisplayexecute one iteration of the render loop in the OpenGL thread- Overrides:
runLoopin classLwjglAbstractDisplay
-
restart
public void restart()Description copied from class:LwjglAbstractDisplayRestart if it's a windowed or full-screen display.- Specified by:
restartin interfaceJmeContext- Specified by:
restartin classLwjglAbstractDisplay
-
getType
- Specified by:
getTypein interfaceJmeContext- Specified by:
getTypein classLwjglAbstractDisplay- Returns:
- Type.Display or Type.Canvas
-
setTitle
Description copied from class:LwjglAbstractDisplaySet the title if it's a windowed display- Specified by:
setTitlein interfaceJmeContext- Specified by:
setTitlein classLwjglAbstractDisplay- Parameters:
title- the desired title
-