/* CENTRY */ void APIENTRY glutMainLoop(void) { #if !defined(_WIN32) if (!__glutDisplay) __glutFatalUsage("main loop entered with out proper initialization."); #endif if (!__glutWindowListSize) __glutFatalUsage( "main loop entered with no windows created."); for (;;) { if (__glutWindowWorkList) { GLUTwindow *remainder, *work; work = __glutWindowWorkList; __glutWindowWorkList = NULL; if (work) { remainder = processWindowWorkList(work); if (remainder) { *beforeEnd = __glutWindowWorkList; __glutWindowWorkList = remainder; } } } if (__glutIdleFunc || __glutWindowWorkList) { idleWait(); } else { if (__glutTimerList) { waitForSomething(); } else { processEventsAndTimeouts(); } } } }
/*********************************************************** * FUNCTION: glutMainLoop (3.1) * * DESCRIPTION: enter the event processing loop ***********************************************************/ void glutMainLoop() { if (!gState.windowListSize) __glutFatalUsage("main loop entered with no windows created."); if(gState.currentWindow) gState.currentWindow->UnlockGL(); for (;;) { if (gState.idle) { idleWait(); } else { if (__glutTimerList) { waitForSomething(); } else { processEventsAndTimeouts(); } } } }
/* CENTRY */ void APIENTRY glutMainLoop(void) { #if !defined(_WIN32) if (!__glutDisplay) __glutFatalUsage("main loop entered with out proper initialization."); #endif if (!__glutWindowListSize) __glutFatalUsage( "main loop entered with no windows created."); for (;;) { if (__glutWindowWorkList) { GLUTwindow *remainder, *work; work = __glutWindowWorkList; __glutWindowWorkList = NULL; if (work) { remainder = processWindowWorkList(work); if (remainder) { *beforeEnd = __glutWindowWorkList; __glutWindowWorkList = remainder; } } } if (__glutIdleFunc || __glutWindowWorkList) { idleWait(); } else { if (__glutTimerList) { waitForSomething(); } else { processEventsAndTimeouts(); } #if defined(_WIN32) // If there is no idle function, go to sleep for a millisecond (we // still need to possibly service timers) or until there is some // event in our queue. MsgWaitForMultipleObjects(0, NULL, FALSE, 1, QS_ALLEVENTS); #endif } } }
/* CENTRY */ void GLUTAPIENTRY glutMainLoop(void) { #if !defined(_WIN32) if (!__glutDisplay) __glutFatalUsage("main loop entered with out proper initialization."); #endif if (!__glutWindowListSize) __glutFatalUsage( "main loop entered with no windows created."); for (;;) { __glutProcessWindowWorkLists(); if (__glutIdleFunc || __glutWindowWorkList) { idleWait(); } else { if (__glutTimerList) { waitForSomething(); } else { processEventsAndTimeouts(); } } } }