I don't see the problem ... or am I missing something?
#include <DarkSDK.h>
#pragma warning( disable : 4244 )
const int MaxDistance = 50;
void DarkSDK(void)
{
dbSyncOn();
dbSyncRate(0);
dbAutoCamOff();
dbMakeObjectCube(1, -5.0);
dbPositionObject(1, 0.0, 0.0, 0.0);
dbDisableObjectZRead(1);
dbDisableObjectZWrite(1);
dbFogOn();
dbFogDistance(50);
dbSetCameraRange(1, 100);
for (int i=100; i < 200; ++i)
{
if (dbRnd(1) == 0)
dbMakeObjectCube(i, 1.0);
else
dbMakeObjectSphere(i, 1.0);
dbPositionObject(i, dbRnd(MaxDistance*2)-MaxDistance, dbRnd(MaxDistance*2)-MaxDistance, dbRnd(MaxDistance*2)-MaxDistance);
}
while (LoopSDK() && !dbEscapeKey() )
{
if (dbUpKey())
dbMoveCamera(0.5);
if (dbDownKey())
dbMoveCamera(-0.5);
dbXRotateCamera(dbCameraAngleX() + dbMouseMoveY());
dbYRotateCamera(dbCameraAngleY() + dbMouseMoveX());
dbPositionObject(1, dbCameraPositionX(), dbCameraPositionY(), dbCameraPositionZ() );
dbSync();
}
}
Works great here.