Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 13 - View Objects / View Objects Reference
View Objects Routines / Rendering in a View


Q3View_EndRendering

You can use the Q3View_EndRendering function to stop rendering an image of a model.

TQ3ViewStatus Q3View_EndRendering (TQ3ViewObject view);
view
A view.
DESCRIPTION
The Q3View_EndRendering function returns, as its function result, a view status value that indicates the current state of the rendering of an image of a model in the view specified by the view parameter. Q3View_EndRendering returns one of these four values:

typedef enum TQ3ViewStatus {
   kQ3ViewStatusDone,
   kQ3ViewStatusRetraverse,
   kQ3ViewStatusError,
   kQ3ViewStatusCancelled
} TQ3ViewStatus;
If Q3View_EndRendering returns kQ3ViewStatusDone, the rendering of the image has been completed and the specified view is no longer in rendering mode. At that point, it is safe to exit your rendering loop. If double-buffering is active, the front buffer is updated with the rendered image.

IMPORTANT
If the renderer associated with the specified view relies on a hardware accelerator for some or all of its operation, Q3View_EndRendering may return kQ3ViewStatusDone even though the rendering has not yet completed. (When a hardware accelerator is present, rendering occurs asynchronously.) If you must know when the rendering has actually finished, call the Q3Renderer_Sync function (described in the chapter "Renderer Objects").
If Q3View_EndRendering returns kQ3ViewStatusRetraverse, the rendering of the image has not yet been completed. You should respecify the model by reentering your rendering loop.

If Q3View_EndRendering returns kQ3ViewStatusError, the rendering of the image has failed because the renderer associated with the view encountered an error in processing the model. You should exit the rendering loop.

If Q3View_EndRendering returns kQ3ViewStatusCancelled, the rendering of the image has been canceled. You should exit the rendering loop.

SPECIAL CONSIDERATIONS
You should call Q3View_EndRendering only if rendering is already occurring.

SEE ALSO
See "Rendering an Image" on page 13-4 for a sample rendering loop.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help