Raj N. Vaidya wrote: > Have been experimenting with the setMinimumFrameCycleTime > method in the View class and having some problems in trying > to get a handle on how it works and how best to use it. > > Essentially, I am going thru' the following sequence of > steps from within the actionPerformed callback from > a JButton: > > // step 1: > // set the FrameCycleTime to a high value > view.setMinimumFrameCycleTime(100000); // 100 sec. > > // step 2: > // create a new GeometryArray+Shape3D+BranchGroup > // and make live the new BG > > // step 3: > // reset the FrameCycleTime > view.setMinimumFrameCycleTime(0); // default value > > Possibly my experiments with the above logic may not have > been exhaustive enough to draw any definitive conclusions, > but this is what seems to happen: > > When I press the JButton, my canvas appears to remain in > a state of lull for roughly 100 sec. before it updates > itself to make visible the newly attached BG. And this > happens even if the time taken by Step 2 is much less than > the frame update period, i.e., 100 sec. So it appears that > the FrameCycleTime value is not continuously polled to check > if its value has been changed. >
It is possible since when step2 the new scene graph make live it is using the old setMinimumFrameCycleTime with 100 sec. Until the its value restore to default 0 rendering will happen every 100 sec. In your case you should try setting view.setMinimumFrameCycleTime(0) BEFORE create a new scenegraph and make it live. A small test case would be great if I misunderstand the issues here. > Alright, I may have have just accepted the above result for > what it is if I hadn't in a moment of wild abandon completely > commented out Step 2 and ran the app. in that trivial mode. > And with that, surprisingly, the canvas came to life > instantaneously without waiting for the full 100 sec. > This seems to suggest that making live a BG during the > frame update period somehow makes the View to remain > unresponsive to the newly set time period. Is this along > expected lines ? > > What I would have liked to see though is for the View to respond > to the new time period as and when it is set, perhaps with a > reasonable time lag for compilation etc. This would obviate > the need for guesstimating a value for cycle time that would be > optimally high under various conditions. > > As I said, my experiments may not have been thorough. Just want > to get some quick ideas before I proceed further. > > TIA and Rgds > > Vaidya > - Kelvin -------------- Java 3D Team Sun Microsystems Inc. =========================================================================== 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".
