Whenever I want to set the window on or off in game, all I'm left is a black screen. Please take a look at the example. Keys to set window are F3 and F4.
#include "DarkGDK.h"
void DarkGDK ( void )
{
float a=0;
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetWindowTitle ( "My C++ application" );
dbMakeObjectCube ( 1, 100 );
while ( LoopGDK ( ) )
{
dbYRotateObject ( 1, a );
dbSync ( );
a=a+1;
if (dbKeyState ( 61 ) == 1) // Key is 'F3'
{
dbSetWindowOn();
dbSetWindowLayout ( 1, 1, 1 );
}
if (dbKeyState ( 62 ) == 1) // Key is 'F4'
dbSetWindowOff();
}
}
I tried this in DBPro too and it crashes. object no longer exists.
So I'm guessing SetWindow flushes the video memory, is there anyway around this?