- use new way to integrate panel in SDK

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8346 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 6df9eaf033
commit 322317f5f2
  1. 3
      sdk/jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java
  2. 4
      sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.java

@ -50,6 +50,7 @@ import com.jme3.scene.Spatial.CullHint;
import com.jme3.system.AppSettings;
import com.jme3.system.awt.AwtPanel;
import com.jme3.system.awt.AwtPanelsContext;
import com.jme3.system.awt.PaintMode;
import java.io.IOException;
import java.util.Collection;
import java.util.Iterator;
@ -146,7 +147,7 @@ public class SceneApplication extends Application implements LookupProvider, Loo
public AwtPanel getMainPanel() {
if (panel == null) {
panel = ((AwtPanelsContext) getContext()).createPanel(true);
panel = ((AwtPanelsContext) getContext()).createPanel(PaintMode.Accelerated);
panel.attachTo(viewPort, overlayView, guiViewPort);
((AwtPanelsContext) getContext()).setInputSource(panel);
}

@ -294,7 +294,7 @@ public final class SceneViewerTopComponent extends TopComponent {
@Override
public void componentOpened() {
super.componentOpened();
oglCanvas.setActiveUpdates(true);
// oglCanvas.setActiveUpdates(true);
}
@Override
@ -310,7 +310,7 @@ public final class SceneViewerTopComponent extends TopComponent {
@Override
public void componentClosed() {
super.componentClosed();
oglCanvas.setActiveUpdates(false);
// oglCanvas.setActiveUpdates(false);
SceneRequest req = SceneApplication.getApplication().getCurrentSceneRequest();
if (req != null) {
SceneApplication.getApplication().closeScene(req);

Loading…
Cancel
Save