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, wasActive
Fields inherited from class com.jme3.system.lwjgl.LwjglContext
clContext, clPlatform, created, createdLock, joyInput, keyInput, listener, mouseInput, renderable, renderer, settings, THREAD_NAME, timer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(boolean waitFor) Creates the context and makes it active.protected void
createContext
(AppSettings settings) Apply the settings, changing resolution, etc.protected void
Destroy the context.protected org.lwjgl.opengl.DisplayMode
getFullscreenDisplayMode
(int width, int height, int bpp, int freq) getType()
void
restart()
Restart if it's a windowed or full-screen display.void
runLoop()
execute one iteration of the render loop in the OpenGL threadvoid
Set 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, setAutoFlushFrames
Methods 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
DisplayMode
matches with specified settings or return null if no matching display mode is found
-
createContext
Description copied from class:LwjglAbstractDisplay
Apply the settings, changing resolution, etc.- Specified by:
createContext
in classLwjglAbstractDisplay
- Parameters:
settings
- the AppSettings to apply- Throws:
org.lwjgl.LWJGLException
- for various error conditions
-
destroyContext
protected void destroyContext()Description copied from class:LwjglAbstractDisplay
Destroy the context.- Specified by:
destroyContext
in classLwjglAbstractDisplay
-
create
public void create(boolean waitFor) Description copied from interface:JmeContext
Creates the context and makes it active.- Parameters:
waitFor
- If true, will wait until context has initialized.
-
runLoop
public void runLoop()Description copied from class:LwjglAbstractDisplay
execute one iteration of the render loop in the OpenGL thread- Overrides:
runLoop
in classLwjglAbstractDisplay
-
restart
public void restart()Description copied from class:LwjglAbstractDisplay
Restart if it's a windowed or full-screen display.- Specified by:
restart
in interfaceJmeContext
- Specified by:
restart
in classLwjglAbstractDisplay
-
getType
- Specified by:
getType
in interfaceJmeContext
- Specified by:
getType
in classLwjglAbstractDisplay
- Returns:
- Type.Display or Type.Canvas
-
setTitle
Description copied from class:LwjglAbstractDisplay
Set the title if it's a windowed display- Specified by:
setTitle
in interfaceJmeContext
- Specified by:
setTitle
in classLwjglAbstractDisplay
- Parameters:
title
- the desired title
-