View Full Version : Subwindows
12-30-2007, 02:01 PM
How can I have multiple Subwindows and one glutIdleFunc() share by all subwindows and the main window...is possible?
12-30-2007, 04:52 PM
I haven't used GLUT for years but I think the idle func is non-window specific. It gets called whenever there is no messages to be processed for any window.
12-31-2007, 06:54 AM
Yes but I think it can only be called one time....Is there anything to do to have it too in my subwindow?
12-31-2007, 07:21 AM
As HenriH stated, the idle func is called when the application has no job to do (is idle). So this func has nothing to do with any window. Your question is just not correct.
12-31-2007, 10:14 AM
if I'm wrong sorry...
I have one main window and one subwindow on it. In the subwindow now I have to put which callback functions I want to call but the idle function I cannot put it, only once can be call...
12-31-2007, 06:34 PM
You seem to be misunderstanding something.
The idle func is not called for each window. It is called whenever there is no system messages to be processed from any window. If you have many windows, it doesn't matter. There is only one idle callback in the whole application. So you just set up the idle callback once at program startup. For other callbacks (mouse, keyboard etc.), you set then per window/subwindow basis.
01-01-2008, 07:24 AM
Ok I think get the point now
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.