topical media & game development
lib-game-darkgdk-samples-Example-1-Demo.cpp / cpp
// Dark GDK - The Game Creators - www.thegamecreators.com
// include Dark GDK header file
include <DarkGDK.h>
// main entry point for program
void DarkGDK ( void )
{
// set sync on and sync rate to 60 frames per second
dbSyncOn ( );
dbSyncRate ( 60 );
// make a cube
dbMakeObjectCube ( 1, 10 );
// loop until the escape key is pressed
while ( LoopGDK ( ) )
{
if ( dbEscapeKey ( ) )
return;
// rotate the object
dbRotateObject ( 1, dbObjectAngleX ( 1 ) + 0.1f, dbObjectAngleY ( 1 ) + 0.1f, dbObjectAngleZ ( 1 ) + 0.1f );
// update screen
dbSync ( );
}
}
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.