From: "Guang Bin Liu" <[EMAIL PROTECTED]>
Sent: Sunday, November 11, 2001 7:30 PM


> Hi Dave:
>
> Thank you for your suggestion.
>
> In the render() method, I used code like this:
> view=canvas.getView();
> view.setMinimumFrameCycleTime((long) 0.005);

The param for setMinimumFrameCycleTime is a long.  So, for
example, to set the maximum frame rate to 20 frames per second,
you want to set the minimum frame time to 1000 (ms)/20 = 50 ms.
Casting 0.005 to a long will give zero.  Try something like:

view.setMinimumFrameCycleTime(50);

As Dave pointed out, the net effect will depend to a great
extent on your OS.  If you're just trying to overcome
persistence problems, maybe you'll be ok though.

Incidentally, if you're doing this by extending Canvas3D, you
can affect the frame rate by inserting a Thread.sleep(dt) into
one of the overridden methods.  (There's an example that uses
the technique posted somewhere in the archives here.  Look for
'PureImmediate.java').

Fred Klingener

> . . .

===========================================================================
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".

Reply via email to