Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 2 - DrawSprocket / DrawSprocket Reference
DrawSprocket Functions / Drawing and Double Buffering


DSpContext_SetDirtyRectGridSize

You can use the DSpContext_SetDirtyRectGridSize function to suggest a grid cell size for the context's dirty rectangles.

OSStatus DSpContext_SetDirtyRectGridSize (
DSpContextReference inContext,
UInt32 inCellPixelWidth,
UInt32 inCellPixelHeight);
inContext
A reference to a context for which you want to set the size of the dirty rectangle grid units.
inCellPixelWidth
The width of the grid unit in pixels.
inCellPixelHeight
The height of the grid unit in pixels.
function result
A result code.
DESCRIPTION
The DSpContext_SetDirtyRectGridSize function takes a reference to a context in the inContext parameter and sets the dirty rectangle grid cell size for that context as closely as possible to the dimensions passed in the inCellPixelWidth and inCellPixelHeight parameters. The size used depends on factors such as the L1 cache size and the CPU bus width, so your suggested values may not be the actual values used, but DrawSprocket will attempt to match your suggested size as closely as possible.

To find out what size grid cells DrawSprocket is actually using, call DSpContext_GetDirtyRectGridSize (page 2-54). To find out the base size that all grid units must be a multiple of, use the DSpContext_GetDirtyRectGridUnits function ((page 2-55)).

CALLING RESTRICTIONS
Do not call this function during an interrupt.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996