I am making a program in which i need to texture a 10 * 10 wall of boxes. I load the image and try to texture the boxes but nothing happens. I've tried it in a nother program where i only texture one box and it works fine. I've beed staring at the code for half an hour and i can't find anything wrong with it... Plase help!
#include "DarkGDK.h"
int boxID=1;
int x=0;
int y=0;
int camY=0;
int camX=0;
// 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 );
dbLoadImage ("gold.jpg", 1);
dbSetDisplayMode (800, 600, 32);
for (int i=0;i<=9;i++){
for (int j=0;j<=9;j++){
dbMakeObjectBox (boxID, 4, 4, 4);
dbPositionObject (boxID, 6*i , 6*j, 0);
dbTextureObject (boxID, 1);
boxID++;
}
}
dbPositionCamera (27, 27, -80);
// our main loop
while ( LoopGDK ( ) )
{
// update the screen
dbSync ( );
}
// return back to windows
return;
}
Thank You!
I just love the smell of code in the morning...