#include "DarkGDK.h"
// the main entry point for the application is this function
void DarkGDK ( void )
{
int time = 1;
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetAmbientLight( 15 );
// Load a pyramid
dbLoadObject( "Media/pyramid1.X", 1 );
dbScaleObject( 1, 3000, 3000, 3000 );
dbPositionObject( 2, 200, 0, 0 );
// Make a box
dbMakeObjectBox( 2, 100, 100, 100 );
dbPositionObject( 2, -200, 0, 0 );
dbSetObjectLight(1,1);
dbSetObjectAmbient(1,1);
dbSetObjectAmbience(1,0xffffff);
dbSetObjectSmoothing(1,30);
dbSetObjectDiffuse(1,0xffffff);
dbSetObjectSpecular(1,0xffffff);
dbSetObjectSpecularPower(1,100);
// dbSetObjectEmissive(1,0x888888);
dbMakeLight(1);
dbSetLightRange(1,5000);
// our main loop
while ( LoopGDK ( ) )
{
time ++;
// Control the camera
dbControlCameraUsingArrowKeys( 0, 3, 2 );
dbPositionLight(1,dbCameraPositionX(),dbCameraPositionY(),dbCameraPositionZ() );
dbRotateObject( 1, time, time, time );
dbRotateObject( 2, time, time, time );
// update the screen
dbSync ( );
}
// return back to windows
return;
}
I had a look at it and added a few commands to get it to do stuff. For some reason I don't have a .x importer on any of my 3d modellers to alter the object properties.
EDIT: The dbSetObjectEmissive() seemed to brighten it up though. Ambient and Ambience is what got it working...
Warning! May contain Nuts!