#include <demo.h> void DEMOInit(GXRenderModeObj* mode);
| mode | Render mode. |
|---|
None.
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.
This function initializes the components of the operating system and device drivers. The mode 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 OSAlloc function.
This function initializes the video controller with a 640x480 interlaced display and a 60 Hz refresh rate.
#include <demo.h>
#include <math.h>
void main ( void )
{
// initialize render settings
DEMOInit(NULL);
while ( ! ( DemoPadGetButton(0) & PAD_BUTTON_MENU ) )
{
// get pad status
DEMOPadRead( );
// Draw scene
DEMOBeforeRender( );
GlobalSceneDraw( &myGlobal );
DEMODoneRender( );
}
OSHalt("End of demo");
}
DEMOBeforeRender, DEMODoneRender, DEMOSwapBuffers, DEMOGetRenderModeObj, DEMOGetCurrentBuffer
2006/03/01 Initial version.
CONFIDENTIAL