Im Having trouble with a project im working on.
I took one of the tutorals for Dark GDK and modified it to allow keyboard interaction. It worked until I exited once I restarted I was not able to get keyboard interaction again can anyone explain why?
The other thing is that with the keyboard interaction the play was extreeemly choppy is there anyway i can fix this
here is the code
thanks
Quote: "
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 40 );
// Loading the media folder
SetCurrentDirectory ( "media" );
dbLoadObject ( "universe.dbo", 1 );
dbSetObjectLight ( 1, 0 );
// creating a skybox
dbLoadObject ( "skybox2.x", 2 );
dbSetObjectLight ( 2, 0 );
dbSetObjectTexture ( 2, 3, 2 );
dbScaleObject ( 2, 5000, 5000, 5000 );
// camera setup
dbPositionCamera ( 434, 42, -517 );
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
// our main loop
while ( LoopGDK ( ) )
{
// let the user move the camera around with the arrow keys
// the 1 here is for height (for those who may ask)
dbControlCameraUsingArrowKeys ( 1, 0.6f, 0.6f );
// allow the user to use mouse to view 360
fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY () * 0.4f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX () * 0.4f );
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
// update the screen
dbSync ( );
}
// return back to windows
return;
}
"
If it can be missunderstood or messed up i can stuff it up even more!