com.jme3.system.lwjgl
Class LwjglCanvas
java.lang.Object
com.jme3.system.lwjgl.LwjglContext
com.jme3.system.lwjgl.LwjglAbstractDisplay
com.jme3.system.lwjgl.LwjglCanvas
- All Implemented Interfaces:
- JmeCanvasContext, JmeContext, java.lang.Runnable
public class LwjglCanvas
- extends LwjglAbstractDisplay
- implements JmeCanvasContext
Method Summary |
protected org.lwjgl.opengl.PixelFormat |
acquirePixelFormat(boolean forPbuffer)
It seems it is best to use one pixel format for all shared contexts. |
void |
create(boolean waitFor)
Creates the context and makes it active. |
protected void |
createContext(AppSettings settings)
This is called:
1) When the context thread starts
2) Any time the canvas becomes displayable again. |
protected void |
destroyContext()
This is called:
1) When the context thread ends
2) Any time the canvas becomes non-displayable |
protected void |
destroyPbuffer()
|
java.awt.Canvas |
getCanvas()
|
JmeContext.Type |
getType()
|
protected void |
makePbufferAvailable()
Makes sure the pbuffer is available and ready for use |
void |
restart()
Restart if its a windowed or full-screen display. |
protected void |
runLoop()
execute one iteration of the render loop in the OpenGL thread |
void |
setTitle(java.lang.String title)
Set the title if its a windowed display |
Methods inherited from class com.jme3.system.lwjgl.LwjglContext |
create, createContextAttribs, destroy, getRenderer, getSettings, getTimer, initContextFirstTime, internalCreate, internalDestroy, isCreated, isRenderable, printContextInitInfo, setSettings, setSystemListener, waitFor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jme3.system.JmeContext |
destroy, getJoyInput, getKeyInput, getMouseInput, getRenderer, getSettings, getTimer, getTouchInput, isCreated, isRenderable, setAutoFlushFrames, setSettings, setSystemListener |
TASK_NOTHING
protected static final int TASK_NOTHING
- See Also:
- Constant Field Values
TASK_DESTROY_DISPLAY
protected static final int TASK_DESTROY_DISPLAY
- See Also:
- Constant Field Values
TASK_CREATE_DISPLAY
protected static final int TASK_CREATE_DISPLAY
- See Also:
- Constant Field Values
TASK_COMPLETE
protected static final int TASK_COMPLETE
- See Also:
- Constant Field Values
USE_SHARED_CONTEXT
protected static final boolean USE_SHARED_CONTEXT
- See Also:
- Constant Field Values
LwjglCanvas
public LwjglCanvas()
getType
public JmeContext.Type getType()
- Specified by:
getType
in interface JmeContext
- Specified by:
getType
in class LwjglAbstractDisplay
- Returns:
- Type.Display or Type.Canvas
create
public void create(boolean waitFor)
- Description copied from interface:
JmeContext
- Creates the context and makes it active.
- Specified by:
create
in interface JmeContext
- Parameters:
waitFor
- If true, will wait until context has initialized.
setTitle
public void setTitle(java.lang.String title)
- Description copied from class:
LwjglAbstractDisplay
- Set the title if its a windowed display
- Specified by:
setTitle
in interface JmeContext
- Specified by:
setTitle
in class LwjglAbstractDisplay
- Parameters:
title
- The new title of the display.
restart
public void restart()
- Description copied from class:
LwjglAbstractDisplay
- Restart if its a windowed or full-screen display.
- Specified by:
restart
in interface JmeContext
- Specified by:
restart
in class LwjglAbstractDisplay
getCanvas
public java.awt.Canvas getCanvas()
- Specified by:
getCanvas
in interface JmeCanvasContext
runLoop
protected void runLoop()
- Description copied from class:
LwjglAbstractDisplay
- execute one iteration of the render loop in the OpenGL thread
- Overrides:
runLoop
in class LwjglAbstractDisplay
acquirePixelFormat
protected org.lwjgl.opengl.PixelFormat acquirePixelFormat(boolean forPbuffer)
- It seems it is best to use one pixel format for all shared contexts.
- See Also:
- http://developer.apple.com/library/mac/#qa/qa1248/_index.html
makePbufferAvailable
protected void makePbufferAvailable()
throws org.lwjgl.LWJGLException
- Makes sure the pbuffer is available and ready for use
- Throws:
org.lwjgl.LWJGLException
destroyPbuffer
protected void destroyPbuffer()
destroyContext
protected void destroyContext()
- This is called:
1) When the context thread ends
2) Any time the canvas becomes non-displayable
- Specified by:
destroyContext
in class LwjglAbstractDisplay
createContext
protected void createContext(AppSettings settings)
- This is called:
1) When the context thread starts
2) Any time the canvas becomes displayable again.
- Specified by:
createContext
in class LwjglAbstractDisplay