[Main]
Name=GrayDBufSetActiveIdxSync
Type=Function
Subtype=Macro
Header Files=gray.h
Definition=void GrayDBufSetActiveIdxSync (short idx);
Real Definition=#define GrayDBufSetActiveIdxSync(i) ((void)(GrayWaitNSwitches (1), GrayDBufSetActiveIdx (i)))
See Also=gray.h/GrayDBufSetActiveIdx, gray.h/GrayDBufToggleSync, gray.h/GrayDBufToggle, gray.h/GrayDBufGetActiveIdx, gray.h/GrayDBufGetHiddenIdx

[Description]
Synchronizes and sets the currently visible double buffer.

[Explanation]
GrayDBufSetActiveIdxSync waits until the next plane switch occurs
(using <A HREF="$$LINK(gray.h/GrayWaitNSwitches)">GrayWaitNSwitches</A>), then calls
<A HREF="$$LINK(gray.h/GrayDBufSetActiveIdx)">GrayDBufSetActiveIdx</A>. This way you
can make sure that the switch is not performed during an update of the
screen, which would cause unwanted distortion effects.
