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 3.0"> 7<meta http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<title>VIGetRetraceCount</title> 10</head> 11 12<body> 13 14<h1 align="left">VIGetRetraceCount</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/vi.h> 19 20u32 VIGetRetraceCount(void); 21</pre></dd></dl> 22 23<h2>Arguments</h2> 24<p>None.</p> 25 26<h2>Return Values</h2> 27<p>The number of retrace interrupts.</p> 28 29<h2>Description</h2> 30<p>This function returns how many retrace interrupts have occurred since the <a href="VIInit.html"><code>VIInit</code></a> function was called.</p> 31 32<h2>Sample Code</h2> 33<p>The following code shows how to achieve 30Hz rendering using this function:</p> 34 35<dl><dd><pre class="construction"> 36 VIWaitForRetrace(); // just to make sure the first frame starts 37 // from the very beginning of the field. 38 while(1) { 39 count = VIGetRetraceCount(); 40 41 // rendering 42 43 while (VIGetRetraceCount() == count) 44 ; 45 46 VISetNextFrameBuffer(nextbuffer); 47 VIFlush(); 48 VIWaitForRetrace(); 49 } 50</pre></dd></dl> 51 52<h2>See Also</h2> 53<P class="reference"> 54<a href="VIInit.html">VIInit</a> 55</P> 56 57<h2>Revision History</h2> 58<P> 592006/03/01 Initial version.<br> 60</P> 61 62<hr><p>CONFIDENTIAL</p></body> 63</html> 64