Fix items in Translucent bucket not be rendered in AWT panels

experimental
shadowislord 11 years ago
parent 64b3be5334
commit 595183fb64
  1. 14
      jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanel.java
  2. 4
      jme3-desktop/src/main/java/com/jme3/system/awt/AwtPanelsContext.java

@ -288,11 +288,7 @@ public class AwtPanel extends Canvas implements SceneProcessor {
repaintRequest.set(true);
}
public void postFrame(FrameBuffer out) {
if (!attachAsMain && out != fb){
throw new IllegalStateException("Why did you change the output framebuffer?");
}
void onFrameEnd() {
if (reshapeNeeded.getAndSet(false)) {
reshapeInThread(newWidth, newHeight);
} else {
@ -316,6 +312,14 @@ public class AwtPanel extends Canvas implements SceneProcessor {
}
}
public void postFrame(FrameBuffer out) {
if (!attachAsMain && out != fb){
throw new IllegalStateException("Why did you change the output framebuffer?");
}
// onFrameEnd();
}
public void reshape(ViewPort vp, int w, int h) {
}

@ -186,6 +186,10 @@ public class AwtPanelsContext implements JmeContext {
}
listener.update();
for (AwtPanel panel : panels){
panel.onFrameEnd();
}
}
private void destroyInThread(){

Loading…
Cancel
Save