aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo00.java4
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo01.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo00.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo00.java
index 5a3fc3a65..8f8eac1cf 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo00.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo00.java
@@ -103,7 +103,7 @@ public class UISceneDemo00 {
window.setTitle(UISceneDemo00.class.getSimpleName()+": "+window.getSurfaceWidth()+" x "+window.getSurfaceHeight());
}
@Override
- public void windowDestroyed(final WindowEvent e) {
+ public void windowDestroyNotify(final WindowEvent e) {
animator.stop();
}
});
@@ -151,7 +151,7 @@ public class UISceneDemo00 {
final long t0_us = Clock.currentNanos() / 1000; // [us]
long t1_us = t0_us;
shape.moveTo(min_obj, 0f, 0f); // move shape to min start position
- while( shape.getPosition()[0] < max_obj ) {
+ while( shape.getPosition()[0] < max_obj && window.isNativeValid() ) {
final long t2_us = Clock.currentNanos() / 1000;
final float dt_s = ( t2_us - t1_us ) / 1e6f;
t1_us = t2_us;
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo01.java
index c4c82cb1c..007a5403b 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo01.java
@@ -110,7 +110,7 @@ public class UISceneDemo01 {
window.setTitle(UISceneDemo01.class.getSimpleName()+": "+window.getSurfaceWidth()+" x "+window.getSurfaceHeight());
}
@Override
- public void windowDestroyed(final WindowEvent e) {
+ public void windowDestroyNotify(final WindowEvent e) {
animator.stop();
}
});
@@ -159,7 +159,7 @@ public class UISceneDemo01 {
final long t0_us = Clock.currentNanos() / 1000; // [us]
long t1_us = t0_us;
shape.moveTo(min_obj, 0f, 0f); // move shape to min start position
- while( shape.getPosition()[0] < max_obj ) {
+ while( shape.getPosition()[0] < max_obj && window.isNativeValid() ) {
final long t2_us = Clock.currentNanos() / 1000;
final float dt_s = ( t2_us - t1_us ) / 1e6f;
t1_us = t2_us;