[JAVA3D] controlling the frame rate

2002-02-22 Thread Schäfer, Peter

Hi,

I have an application where the user is dragging objects around the scene.

When there is no user interaction I lower the frame rate to about 1 frame
per second
to save CPU power (calling View.setMinimumFrameCycleTime().

As soon as the user clicks the mouse I increase the frame rate. But the next
frame is still
rendered after one second, so there is a noticeable delay.

Is there a way to force rendering of the next frame immediately ?

{ View.startView() didn't do the trick ;-(  }


 Peter

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA3D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.



Re: [JAVA3D] controlling the frame rate

2002-02-22 Thread Fred Klingener

From: Schäfer, Peter [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 11:44 AM


 Hi,

 I have an application where the user is dragging objects around the scene.

 When there is no user interaction I lower the frame rate to about 1 frame
 per second
 to save CPU power (calling View.setMinimumFrameCycleTime().

 As soon as the user clicks the mouse I increase the frame rate. But the
next
 frame is still
 rendered after one second, so there is a noticeable delay.

 Is there a way to force rendering of the next frame immediately ?

Peter,

My preference is to control frame rate from within the Behaviors.  No real
hard reason.  Just distrust of View.  As long as your 'long' frame delays
are on the order of a second (i.e. delay  15ms) and you can tolerate the
grainy resolution, then using wakeupOnElapsedTime(delay) should be ok for
your normal 'standby' display.  In your AWT code, you make the model changes
and set wakeupOnElapsedFrames(0) and reset to wakeupOnElapsedTime(delay)
after your changes have run their course.

I haven't built anything that runs this way, so it's more hunch and
prejudice than anything.  It's where I'd start though.

HTH,

Fred Klingener
Brock Engineering

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA3D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.