65 /** 66 * Drawing can occur when there is an embedded scene that has a host. 67 * 68 * @return true if drawing can occur; false otherwise 69 * 70 * May be called on any thread. 71 */ 72 @Override 73 public boolean isValid() { 74 return scene != null && getWidth() > 0 && getHeight() > 0; 75 } 76 77 /** Updates the state of this object based on the current state of its 78 * nativeWindow. 79 * 80 * May only be called from the event thread. 81 */ 82 @Override 83 public void update() { 84 super.update(); 85 float scale = ((EmbeddedScene) scene).getRenderScale(); 86 update(1.0f, scale, scale); 87 if (scene != null) { 88 // These variables and others from the super class need be kept up to date to 89 // minimize rendering. For now, claim that the embedded scene is always visible 90 // and not minimized so that rendering can occur 91 isWindowVisible = true; 92 isWindowMinimized = false; 93 } 94 } 95 } | 65 /** 66 * Drawing can occur when there is an embedded scene that has a host. 67 * 68 * @return true if drawing can occur; false otherwise 69 * 70 * May be called on any thread. 71 */ 72 @Override 73 public boolean isValid() { 74 return scene != null && getWidth() > 0 && getHeight() > 0; 75 } 76 77 /** Updates the state of this object based on the current state of its 78 * nativeWindow. 79 * 80 * May only be called from the event thread. 81 */ 82 @Override 83 public void update() { 84 super.update(); 85 float scalex = ((EmbeddedScene) scene).getRenderScaleX(); 86 float scaley = ((EmbeddedScene) scene).getRenderScaleY(); 87 update(1.0f, 1.0f, scalex, scaley, scalex, scaley); 88 if (scene != null) { 89 // These variables and others from the super class need be kept up to date to 90 // minimize rendering. For now, claim that the embedded scene is always visible 91 // and not minimized so that rendering can occur 92 isWindowVisible = true; 93 isWindowMinimized = false; 94 } 95 } 96 } |