public class LwjglDisplay extends LwjglAbstractDisplay
JmeContext.Type
allowSwapBuffers, autoFlush, frameRate, needClose, wasActive
clContext, clPlatform, created, createdLock, joyInput, keyInput, listener, mouseInput, renderable, renderer, settings, THREAD_NAME, timer
Constructor and Description |
---|
LwjglDisplay() |
Modifier and Type | Method and Description |
---|---|
void |
create(boolean waitFor)
Creates the context and makes it active.
|
protected void |
createContext(AppSettings settings)
Apply the settings, changing resolution, etc.
|
protected void |
destroyContext()
Destroy the context.
|
protected org.lwjgl.opengl.DisplayMode |
getFullscreenDisplayMode(int width,
int height,
int bpp,
int freq) |
JmeContext.Type |
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 thread
|
void |
setTitle(java.lang.String title)
Set the title if it's a windowed display
|
checkGLError, deinitInThread, destroy, getJoyInput, getKeyInput, getMouseInput, getTouchInput, initInThread, run, setAutoFlushFrames
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
protected org.lwjgl.opengl.DisplayMode getFullscreenDisplayMode(int width, int height, int bpp, int freq)
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 foundDisplayMode
matches with specified settings or
return null if no matching display mode is foundprotected void createContext(AppSettings settings) throws org.lwjgl.LWJGLException
LwjglAbstractDisplay
createContext
in class LwjglAbstractDisplay
settings
- the AppSettings to applyorg.lwjgl.LWJGLException
- for various error conditionsprotected void destroyContext()
LwjglAbstractDisplay
destroyContext
in class LwjglAbstractDisplay
public void create(boolean waitFor)
JmeContext
waitFor
- If true, will wait until context has initialized.public void runLoop()
LwjglAbstractDisplay
runLoop
in class LwjglAbstractDisplay
public void restart()
LwjglAbstractDisplay
restart
in interface JmeContext
restart
in class LwjglAbstractDisplay
public JmeContext.Type getType()
getType
in interface JmeContext
getType
in class LwjglAbstractDisplay
public void setTitle(java.lang.String title)
LwjglAbstractDisplay
setTitle
in interface JmeContext
setTitle
in class LwjglAbstractDisplay
title
- the desired title