em... check this code, it might help you... this will make you a square of Spheres
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
int ab = 0;
for ( int a = 0; a < 32; a++ )
{
for ( int b = 0; b < 32; b++ )
{
ab=ab+1;
dbMakeObjectSphere ( ab, 1 );
dbPositionObject ( ab, a*10, 0, b*10);
dbScaleObject ( ab, 400, 400, 400);
dbColorObject ( ab, 0 );
dbSetObjectSpecularPower ( ab, 255 );
dbSetObjectAmbient ( ab, 0 );
}
}
dbPositionCamera ( 50, 10, -20 );
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
while ( LoopGDK ( ) )
{
dbText ( 0, 0, "Use the up and down arrow keys to move the camera" );
dbControlCameraUsingArrowKeys ( 0, 7.0f, 0.3f );
fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY ( ) * 0.4f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX ( ) * 0.4f );
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
dbSync ( );
}
}
If someone need something, add me to your msn