3D Graphics Programming with QuickDraw 3D
TQ3RendererObject
, which is a type of shared object. Q3Renderer_New
or Q3Renderer_NewFromType
. Once you've created a new renderer, you need to associate it with a particular view, for example by calling Q3View_SetRenderer
.You've already seen (in the section "Creating a View," beginning on page 1-29) how to create a renderer object and attach it to a view object. As indicated previously, you can ensure that you take advantage of any available hardware accelerator by using the interactive renderer, as follows:
myRenderer = Q3Renderer_NewFromType(kQ3RendererTypeInteractive);To make the rendered images coherent, you should make the associated draw context double buffered (that is, you should set the
doubleBufferState
field of the draw context data structure to the value kQ3True
). Some hardware rasterizer engines (such as the one supplied by Apple Computer, Inc.) can make coherent images without double buffering. This can provide a significant speed advantage, at the possible cost of some tearing. To take advantage
Q3InteractiveRenderer_SetDoubleBufferBypass(myRenderer, kQ3True);In the unlikely event that you want to use a particular rasterizer with the interactive renderer, you can set a preference with the code:
Q3InteractiveRenderer_SetPreferences(myRenderer, vendor, engine);
Let us know what you think of these prototype pages.
Generated with Harlequin WebMaker