Re: Running the main loop in a separate thread

That's a very nice idea ! I wasn't aware of that function. By doing so the idle in GLUT effectively becomes the main-loop service , but how do I go about starting the application , and I still have the problem of hiding/showing the window properly . The function hide() doesn't seem to do much. The only function described to hide a window is from GDK ( Gdk::Window:withdraw() ) ,and as far as I know GDK stands between X and GTK, so there should be a way to use it (just throwing it out there , I'm clearly a novice here) .

On 09/08/2012 03:17 PM, Florian Philipp wrote:

I have not tried it but I think it would be a better approach to add an
idle callback to GLUT (glutIdleFunc) which runs a single iteration of
the glib main loop.

Something like this:

static void g_iter()
   g_main_context_iteration(NULL /*context*/, FALSE /*block*/);


Florian Philipp

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]