1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
7<title>GXSetDrawDone</title>
8</head>
9<body>
10<h1 align="left">GXSetDrawDone</h1>
11
12<h2>Syntax</h2>
13<dl><dd><pre class="construction">
14#include &lt;revolution/gx.h&gt;
15
16void GXSetDrawDone( void )
17</pre></dd></dl>
18
19<h2>Arguments</h2>
20<p>None.</p>
21
22<h2>Return Values</h2>
23<p>None.</p>
24
25<H2>Description</H2>
26<P>This is one of the synchronization functions.&nbsp;The <CODE>GXSetDrawDone</CODE> function will send a <EM>DrawDone</EM> command to the graphics processor's pipeline. When all previous commands have been processed and the pipeline is empty, a <EM>DrawDone</EM> status bit will be set, and an interrupt will occur.&nbsp;You can receive notification of this event by installing a callback on the interrupt with the <A href="GXSetDrawDoneCallback.html"><CODE>GXSetDrawDoneCallback</CODE></A> function, or you can poll the status bit with the <A href="GXWaitDrawDone.html"><CODE>GXWaitDrawDone</CODE></A> function. The <A href="GXSetDrawDone.html"><CODE>GXSetDrawDone</CODE></A> function flushes the write-gather FIFO in the CPU to make sure that all commands are sent to the graphics processor.</P>
27<P>This function normally uses multibuffer mode (see the <A href="../GfxFIFO/GXSetCPUFifo.html"><CODE>GXSetCPUFifo</CODE></A> function).&nbsp;In immediate mode, the <CODE>GXDrawDone</CODE> function command can be used, which both sends the command and stalls until the <EM>DrawDone</EM> status is <CODE>TRUE</CODE>.</P>
28<P><B>Note:</B> Once the interrupt has fired, command processing will continue.&nbsp;In immediate mode, this is not an issue since there should be no further commands in the FIFO.&nbsp;However, in <em>multi-buffer</em> mode, you may need to place a breakpoint after calling <a href="GXSetDrawDone.html"><code>GXSetDrawDone</code></a> to ensure that commands for subsequent frames are not executed. The <CODE>GXSetDrawDone</CODE> function calls the <A href="../Management/GXFlush.html"><CODE>GXFlush</CODE></A> function. Therefore, there is no need to explicitly call the <A href="../Management/GXFlush.html"><CODE>GXFlush</CODE></A> function after you have set the <EM>DrawDone</EM> command with <CODE>GXSetDrawDone</CODE>.</P>
29
30<h2>See Also</h2>
31<P class="reference">
32<a href="GXFlush.html">GXFlush</a>
33</p>
34
35<H2>Revision History</H2>
36<P>
372008/05/12 Mentioned that <CODE>GXFlush</CODE> is included.<br>2006/03/01 Initial version.<br>
38</P>
39
40<hr><p>CONFIDENTIAL</p></body>
41</HTML>