Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > Legacy Documents > Graphics & Imaging >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Q3View_Sync/Q3View_Flush Differences


Q: What is the difference between Q3View_Sync and Q3View_Flush? I have been calling both of them when I want to do a progressive blit, but I get a warning from the QuickDraw 3D debug extensions about being within a submitting loop when calling one of them (not sure which).

A: Q3View_Flush is intended to force the image to be displayed, and as such it's called within submitting loop. It is non-blocking, so it seems like it's the one you're looking for.

Q3View_Sync is a blocking function that only returns after the renderer has finished its frame, and the submit loop has been ended. Thus, it is to be called only outside the submitting loop. Note that a renderer may be "asynchronous" in that it may complete its frame after the submit loop is exited. In that case, the image will appear in the draw context (i.e., within the window) sometime later, when the renderer has finished. The Q3View_Sync call waits until the renderer is done. (Of course, if it is already done, then the call returns immediately). Note that if the application doesn't call Q3View_Sync, and the renderer is asynchronous, the view causes a sync at the start of the next frame, and if the renderer is not done by then, the application will block, and then resume once the renderer is done.

Often, one's application might make a call to Q3View_Sync right after the submitting loop, in which case the application will always synchronize with the rendering - that is, it won't continue until each frame is completed. Obviously, one might want the application to continue on instead, and wait until rendering is completed *after* performing some other tasks or processing (i.e., you put the call to Q3View_Sync later in the code, at the point you'd want to be assured the image was completed before going on). In the simplest case, you can just forgo the Q3View_Sync call altogether, and be assured that the image would appear before the next frame was started.

[Jul 11 1997]