public class JoglCanvas extends JoglAbstractDisplay implements JmeCanvasContext
JmeContext.Type
active, animator, autoFlush, canvas, device, frameRate, useAwt, wasActive, wasAnimating
clContext, created, createdLock, joyInput, keyInput, listener, mouseInput, renderable, renderer, settings, THREAD_NAME, timer
Constructor and Description |
---|
JoglCanvas() |
Modifier and Type | Method and Description |
---|---|
void |
create(boolean waitFor)
Creates the context and makes it active.
|
void |
destroy(boolean waitFor)
Destroys the context completely, making it inactive.
|
void |
display(com.jogamp.opengl.GLAutoDrawable glad) |
void |
dispose(com.jogamp.opengl.GLAutoDrawable arg0)
Callback
|
java.awt.Canvas |
getCanvas() |
JmeContext.Type |
getType() |
void |
init(com.jogamp.opengl.GLAutoDrawable drawable) |
protected void |
onCanvasAdded() |
protected void |
onCanvasRemoved() |
void |
restart()
Destroys and then re-creates the context.
|
void |
setTitle(java.lang.String title)
Sets the title of the display (if available).
|
protected void |
startGLCanvas() |
displayChanged, getKeyInput, getMouseInput, getTouchInput, initGLCanvas, reshape, setAutoFlushFrames
create, destroy, determineMaxSamples, getJoyInput, getNumSamplesToUse, getOpenCLContext, getRenderer, getSettings, getTimer, initContextFirstTime, initOpenCL, internalCreate, internalDestroy, isCreated, isRenderable, setSettings, setSystemListener, waitFor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getJoyInput, getKeyInput, getMouseInput, getOpenCLContext, getRenderer, getSettings, getTimer, getTouchInput, isCreated, isRenderable, setAutoFlushFrames, setSettings, setSystemListener
public JmeContext.Type getType()
getType
in interface JmeContext
public void setTitle(java.lang.String title)
JmeContext
setTitle
in interface JmeContext
title
- The new title of the display.public void restart()
JmeContext
restart
in interface JmeContext
public void create(boolean waitFor)
JmeContext
create
in interface JmeContext
waitFor
- If true, will wait until context has initialized.public void destroy(boolean waitFor)
JmeContext
destroy
in interface JmeContext
waitFor
- If true, will wait until the context is destroyed fully.protected void onCanvasRemoved()
onCanvasRemoved
in class JoglAbstractDisplay
protected void onCanvasAdded()
onCanvasAdded
in class JoglAbstractDisplay
public void init(com.jogamp.opengl.GLAutoDrawable drawable)
init
in interface com.jogamp.opengl.GLEventListener
protected void startGLCanvas()
startGLCanvas
in class JoglAbstractDisplay
public void display(com.jogamp.opengl.GLAutoDrawable glad)
display
in interface com.jogamp.opengl.GLEventListener
public java.awt.Canvas getCanvas()
getCanvas
in interface JmeCanvasContext
public void dispose(com.jogamp.opengl.GLAutoDrawable arg0)
JoglAbstractDisplay
dispose
in interface com.jogamp.opengl.GLEventListener
dispose
in class JoglAbstractDisplay