1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>GXSetDrawSync</title> 10</head> 11 12<body> 13 14<h1 align="left">GXSetDrawSync</h1> 15 16 17<h2>C Specification</h2> 18 19<dl> 20<dd><PRE><CODE>#include <revolution/gx.h></CODE></PRE> 21 </dd> 22<dd><pre><CODE>void GXSetDrawSync( u16 token );</CODE></pre> 23 </dd> 24</dl> 25 26<h2>Arguments</h2> 27<div align="left"> 28<TABLE border="1" cellpadding="3" cellspacing="0.1"> 29 <tr> 30<TD width="120" bgcolor="#ffffe8"><code><em><strong>token</strong></em></code></TD> 31<TD width="520">A 16-bit value for writing to the token register</TD> 32 </tr> 33</TABLE> 34</div> 35 36<h2>Return Values</h2> 37 38<p>None.</p> 39<H2>Description</H2> 40<P>This function sends a <code><em><strong>token</strong></em></code> into the command stream. When the <code><em><strong>token</strong></em></code> reaches the end of the graphics pipeline (just before the frame buffer), it is written to a special <code><em><strong>token</strong></em></code> register. You can read this register using <a href="GXReadDrawSync.html"><code>GXReadDrawSync</code></a>. This allows the application to monitor the completion of graphics rendering tasks.</P> 41<P>When the token register is set, an interrupt is also received by the CPU. You can install a callback on this interrupt with <code><a href="GXSetDrawSyncCallback.html">GXSetDrawSyncCallback</a></code>. This will allow you to sample performance counters to profile the elapsed time between events in the graphics pipeline. Draw syncs can also be used to notify the CPU that the Graphics Processor is finished using a shared resource (a vertex array, for example).</P> 42 43 44<CODE> 45<h2>See Also</h2> 46 47<p><a href="GXReadDrawSync.html"><CODE>GXReadDrawSync</CODE></a><BR> <code><a href="GXSetDrawSyncCallback.html">GXSetDrawSyncCallback</a></code></p> 48<H2>Revision History</H2> 49<P> 5003/01/2006 Initial version.</P> 51</body> 52</html>