here is a better code , but still dosent work
// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple project that uses Dark GDK
// it contains the basic code for a GDK application
// 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 ( 60 );
dbMakeObjectPlain(1,200,200);
dbPositionObject(1,0,0,0);
// our main loop
dbMakeMeshFromObject(1,1);
dbLockVertexDataForMesh(1);
int Vc = dbGetVertexDataVertexCount();
float X[6];
float Y[6];
float Z[6];
for (int i = 0; i < Vc;i++)
{
X[i] = 0;
Y[i] = 0;
Z[i] = 0;
}
for (int n = 0;n < Vc;n++)
{
X[n] = dbGetVertexDataPositionX(n);
Y[n] = dbGetVertexDataPositionX(n);
Z[n] = dbGetVertexDataPositionX(n);
}
dbUnlockVertexData();
for (int n= 0; n < Vc;n++)
{
dbMakeObjectBox(n+10,25,25,25);
dbColorObject(n+10,dbRGB(0,0,255));
dbPositionObject(n+10,X[n],Y[n],Z[n]);
}
dbPositionCamera(0,0,-400);
while ( LoopGDK ( ) )
{
// update the screen
dbLockVertexDataForMesh(1);
for (int i = 0 ;i <Vc;i++)
{
dbSetVertexDataPosition(i,X[i]+1,Y[i]+1,Z[i]+1);
}
dbUnlockVertexData();
for (int i = 0 ;i <Vc;i++)
{
dbText(0,i*10,dbStr(X[i]));
dbText(34,i*10,dbStr(Y[i]));
dbText(68,i*10,dbStr(Z[i]));
}
dbSync ( );
}
// return back to windows
return;
}
and here is an image of whats happening once i debug it