here is code for fsp camera skydome and camera
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );// turn on sync rate and set maximum rate to 60 fps
dbSyncRate ( 60 );
dbLoadObject("scar.x",10);
dbLoadObject("sky.x",20);
dbPositionObject(20,100,+5,0);
dbRotateObject(20,-90,180,0);
dbScaleObject(20,9000,9000,9000);
dbSetObjectLight(20,3000);
dbRotateObject(10,-90,0,0);
dbPositionObject(10,0,-1,2);
dbLockObjectOn(10);
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
float my,mx;
bool flag = !false;
while ( LoopGDK ( ) )
{
dbControlCameraUsingArrowKeys(0,2.0f,2.0f);
//dbMakeMatrix(4,100,100,10,10);
//dbControlCameraUsingArrowKeys ( 0, 5.0f, 0.3f );
my = dbMouseMoveY ( );
mx = dbMouseMoveX ( );
if (dbMouseClick()==2 )
{
fCameraAngleX = dbWrapValue ( fCameraAngleX + my * 0.4f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + mx * 0.4f );
dbPositionMouse (dbScreenWidth() /2, dbScreenHeight() /2);
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
dbHideMouse();
}
else
{
dbShowMouse();
}
if (dbEscapeKey() == 1)
{
dbExitPrompt( "Test","Test");
}
// update the screen
dbSync ( );
}
// return back to windows
return;
}
spider