Previous Book Contents Book Index Next

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


DSpContext_SetUnderlayAltBuffer

Use the DSpContext_SetUnderlayAltBuffer function to designate an alternate buffer to be used as the current underlay buffer for a context.

OSStatus DSpContext_SetUnderlayAltBuffer (
DSpContextReference inContext,
DSpAltBufferReference inNewUnderlay);
inContext
A reference to the context the underlay is to be used with.
inNewUnderlay
A reference to the alternate buffer that holds the underlay.
function result
A result code.
DESCRIPTION
The DSpContext_SetUnderlayAltBuffer function makes the alternate buffer specified in the inNewUnderlay parameter serve as the current underlay for the context specified in the inContext parameter. Underlay buffers are used to "clean" a back buffer when DSpContext_GetBackBuffer is called. When a back buffer is retrieved and there is an underlay buffer, the invalid areas in the back buffer are restored from the underlay buffer. This is most useful in sprite games, or in games where the background is static (or changes infrequently).

CALLING RESTRICTIONS
Do not call this function during an interrupt.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996