- SDK: attach awt panel on OGL thread

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8559 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 383e3c513a
commit c0a35626ef
  1. 12
      sdk/jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java

@ -165,13 +165,23 @@ public class SceneApplication extends Application implements LookupProvider, Loo
} else {
if (panel == null) {
panel = ((AwtPanelsContext) getContext()).createPanel(PaintMode.Accelerated);
panel.attachTo(true, viewPort, overlayView, guiViewPort);
((AwtPanelsContext) getContext()).setInputSource(panel);
attachPanel();
}
return panel;
}
}
private void attachPanel() {
enqueue(new Callable() {
public Object call() throws Exception {
panel.attachTo(true, viewPort, overlayView, guiViewPort);
return null;
}
});
}
public ViewPort getOverlayView() {
return overlayView;
}

Loading…
Cancel
Save