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>DEMOInit</title> 10</head> 11 12<body> 13 14<h1 align="left">DEMOInit</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <demo.h> 19 20void DEMOInit(<A href="../gx/Structures/GXRenderModeObj.html">GXRenderModeObj</A>* mode); 21</pre></dd></dl> 22 23<h2>Arguments</h2> 24<TABLE class="arguments" border="1" > 25 <tr> 26<TH>mode</TH> 27<TD><A href="../gx/Framebuffer/RenderMode.html">Render mode</A>.</TD> 28 </tr> 29</TABLE> 30 31<h2>Return Values</h2> 32<p>None.</p> 33 34<H2>Description</H2> 35<P>The DEMO library provides a common application framework that is used in many of the example demos distributed with the Revolution SDK. The source code for the DEMO library is also distributed with the SDK.</P> 36<P>This function initializes the components of the operating system and device drivers. The <SPAN class="argument">mode</SPAN> argument allows the program to overwrite the default render mode. All of the main memory is then allocated into a heap that can be managed with the <a href="../os/Alloc/OSAlloc.html"><code>OSAlloc</code></a> function.</P> 37<P>This function initializes the video controller with a 640x480 interlaced display and a 60 Hz refresh rate.</P> 38 39<H3>Example Program</H3> 40<P><CODE>#include <demo.h><BR> #include <math.h><BR> <BR> void main ( void )<BR> {<BR> // initialize render settings <BR> <A href="DEMOInit.html">DEMOInit</A>(NULL);<BR> <BR> while ( ! ( DemoPadGetButton(0) & PAD_BUTTON_MENU ) )<BR> {<BR> // get pad status<BR> DEMOPadRead( );<BR> <BR> // Draw scene<BR> <A href="DEMOBeforeRender.html">DEMOBeforeRender</A>( );<BR> GlobalSceneDraw( &myGlobal );<BR> <A href="DEMODoneRender.html">DEMODoneRender</A>( );<BR> }<BR> <BR> OSHalt("End of demo");<BR> }<BR></CODE></P> 41 42<h2>See Also</h2> 43<p class="reference"> 44<A href="DEMOBeforeRender.html">DEMOBeforeRender</A>, 45<A href="DEMODoneRender.html">DEMODoneRender</A>, 46<A href="DEMOSwapBuffers.html">DEMOSwapBuffers</A>, 47<A href="DEMOGetRenderModeObj.html">DEMOGetRenderModeObj</A>, 48<A href="DEMOGetCurrentBuffer.html">DEMOGetCurrentBuffer</A> 49</p> 50 51<H2>Revision History</H2> 52<P> 532006/03/01 Initial version.<br> 54</P> 55 56<hr><p>CONFIDENTIAL</p></body> 57</html>