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:
com.jme3.system.JmeContext,Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jme3.system.JmeContext
com.jme3.system.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) protected voidcreateContext(com.jme3.system.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) com.jme3.system.JmeContext.TypegetType()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
protected void createContext(com.jme3.system.AppSettings settings) throws org.lwjgl.LWJGLException 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) -
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 interfacecom.jme3.system.JmeContext- Specified by:
restartin classLwjglAbstractDisplay
-
getType
public com.jme3.system.JmeContext.Type getType()- Specified by:
getTypein interfacecom.jme3.system.JmeContext- 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 interfacecom.jme3.system.JmeContext- Specified by:
setTitlein classLwjglAbstractDisplay- Parameters:
title- the desired title
-