diff options
author | Julien Gouesse <[email protected]> | 2014-03-20 08:03:52 +0100 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2014-03-20 08:03:52 +0100 |
commit | f9c834769ecccb25dcafe0f605ae5b23c7a2c479 (patch) | |
tree | 5d13a78301815fcf3a910ebe506729b55f149513 /ardor3d-jogl/src | |
parent | 969dddf9423b3738ce9b6527f785e643bf8cd6e5 (diff) |
Adds a few comments into JoglAwtCanvas and clarifies the use of the buffer swapping in JoglNewtWindow
Diffstat (limited to 'ardor3d-jogl/src')
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglAwtCanvas.java | 3 | ||||
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglAwtCanvas.java b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglAwtCanvas.java index cc233c8..85204d5 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglAwtCanvas.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglAwtCanvas.java @@ -26,9 +26,6 @@ import com.ardor3d.framework.DisplaySettings; * Ardor3D JOGL AWT heavyweight canvas, AWT component for the OpenGL rendering of Ardor3D with JOGL that supports the * AWT input system directly and its abstraction in Ardor3D (com.ardor3d.input.awt) * - * FIXME there is still a deadlock when using several instances of this class in the same container, see JOGL bug 572 - * Rather use JoglNewtAwtCanvas in this case. - * */ public class JoglAwtCanvas extends GLCanvas implements Canvas { diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java index 938a53e..f6b25d4 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/JoglNewtWindow.java @@ -67,7 +67,8 @@ public class JoglNewtWindow implements NativeCanvas, NewtWindowContainer { _drawerGLRunnable = new JoglDrawerRunnable(canvasRenderer); _settings = settings; _canvasRenderer = canvasRenderer; - setAutoSwapBufferMode(false); + _canvasRenderer._doSwap = true;// true - do swap in renderer. + setAutoSwapBufferMode(false);// false - doesn't swap automatically in JOGL itself } /** @@ -141,6 +142,11 @@ public class JoglNewtWindow implements NativeCanvas, NewtWindowContainer { _newtWindow.setVisible(visible); } + /** + * Enables or disables automatic buffer swapping for this JoglNewtWindow. By default this property is set to false + * + * @param autoSwapBufferModeEnabled + */ public void setAutoSwapBufferMode(final boolean autoSwapBufferModeEnabled) { _newtWindow.setAutoSwapBufferMode(autoSwapBufferModeEnabled); } @@ -188,7 +194,7 @@ public class JoglNewtWindow implements NativeCanvas, NewtWindowContainer { _newtWindow.invoke(true, new GLRunnable() { @Override public boolean run(final GLAutoDrawable glAutoDrawable) { - _canvasRenderer.init(_settings, true);// true - do swap in renderer. + _canvasRenderer.init(_settings, _canvasRenderer._doSwap); return true; } }); |