Hello all,
sorry for my bad english, im learning (after i had learned c++
)
Here`s a Screenshot-Function from me, you only need GDK-Instructions for it.(!)
#include "DarkGDK.h"
void Screenshot (void);
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbMakeObjectCube ( 1, 10 );
while ( LoopGDK ( ) )
{
if ( dbEscapeKey ( ) )
return;
if ( dbKeyState( 2 ) == 1 )
Screenshot();
dbRotateObject ( 1, dbObjectAngleX ( 1 ) + 0.2f, dbObjectAngleY ( 1 ) + 0.4f, dbObjectAngleZ ( 1 ) + 0.8f );
dbSync ( );
}
}
void Screenshot (void)
{
dbMakeCamera ( 1 );
dbPositionCamera ( 1, dbCameraPositionX ( 0 ), dbCameraPositionY ( 0 ), dbCameraPositionZ ( 0 ) );
dbRotateCamera ( 1, dbCameraAngleX ( 0 ), dbCameraAngleY ( 0 ), dbCameraAngleZ ( 0 ) );
dbSetCameraToImage ( 1, 1, dbScreenWidth(), dbScreenHeight() );
dbSync();
dbSaveImage( "C:\\Screenshot.jpg", 1 );
dbSetCurrentBitmap ( 0 );
dbDeleteImage ( 1 );
dbDeleteCamera ( 1 );
return;
}
Have Fun with it!
Greetings
Mathias