Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 2 - DrawSprocket / DrawSprocket Reference
DrawSprocket Functions / Using Alternate Buffers


DSpAltBuffer_GetCGrafPtr

Use the DSpAltBuffer_GetCGrafPtr function to get the drawing area for an alternate buffer.

OSStatus DSpAltBuffer_GetCGrafPtr (
DSpAltBufferReference inAltBuffer,
DSpBufferKind inBufferKind,
CGrafPtr *outCGrafPtr);
inAltBuffer
A reference to an alternate buffer.
inBufferKind
The kind of buffer. Currently the only supported buffer kind is kDSpBufferKind_Normal.
outCGrafPtr
On exit, the graphics pointer associated with an alternate buffer.
function result
A result code.
DESCRIPTION
You pass the DSpAltBuffer_GetCGrafPtr function a reference to an alternate buffer in the inAltBuffer parameter and the kind of buffer in the inBufferKind parameter. The function returns a graphics pointer in the outCGrafPtr parameter. The pointer may then be used to image into the alternate buffer. After you have imaged into the alternate buffer, remember to invalidate the rectangles that you have worked in using the DSpAltBuffer_InvalRect function (page 2-65).

CALLING RESTRICTIONS
Do not call this function during an interrupt.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996