PDA

View Full Version : finish without closing the display window



06-18-2003, 07:43 AM
I'm runnig a program with output in the msdos window and in a display window created with glut.
I want it to stop without closing these two windows, but I don't know how to achieve the second one to remain open.
Any ideas?? Thank you.

nexusone
06-18-2003, 08:00 AM
What do you mean stop without closing the window?

1. Stop animation?

2. Exit the program and leave open the windows?


If number 2, why do you want to do that?


Originally posted by nusuto:
I'm runnig a program with output in the msdos window and in a display window created with glut.
I want it to stop without closing these two windows, but I don't know how to achieve the second one to remain open.
Any ideas?? Thank you.

06-20-2003, 02:23 AM
In fact, I need to do both:

1. Make a pause in the animation whenever I want (I thnik It can be donde with the KeyFunction).

2. Maintain open the animation window when finished until I want. It's beacuse my animations are very long in time and I need to know when and how they stopped (without having to stay there watching all time).

I'll be so gratefull if you could help me (I have no idea about how to do that).

Thank you very much.

nexusone
06-20-2003, 04:30 AM
1. Keyboard input set's a variable state to on/off... something like my_animation_state; 0 = stopped animation, start animation.

2. No you can not exit a program and keep the window open, but you can have a function that when the animation has stopped on its own make the program become idle.

Now if you want the catch an error that caused the animation to stop, create a log file. Simply open a fine in write mode and every x-seconds write a line to the file, something like time running and some variable states.



Originally posted by nusuto:
In fact, I need to do both:

1. Make a pause in the animation whenever I want (I thnik It can be donde with the KeyFunction).

2. Maintain open the animation window when finished until I want. It's beacuse my animations are very long in time and I need to know when and how they stopped (without having to stay there watching all time).

I'll be so gratefull if you could help me (I have no idea about how to do that).

Thank you very much.