I'm just getting to grips with GDK, and I have an issue with objects being lit when I change the screen size.
This is the example code i'm using:
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn( );
dbSyncRate( 0 );
dbSetDisplayMode( 1336, 768, 32 );
dbSetCameraAspect( 0, 1366.0f / 768.0f );
// Make a Cube
dbMakeObjectBox(1, 1, 1, 1);
// our main loop
while ( LoopGDK ( ) )
{
// Rotate Object
dbTurnObjectLeft(1, 0.1f);
dbRollObjectRight(1, 0.1f);
dbPitchObjectUp(1,0.1f);
// update the screen
dbSync ( );
}
// return back to windows
return;
}
The object appears unlit, with a constant colour. (No shadows/highlights.)
If I comment out the line: dbSetDisplayMode( 1336, 768, 32 );
then I have a properly lit object?
Can anyone shed any light (get it??) on this for me?
And also, how can I switch the program to be fullscreen windowed? My minds a blank!