PDA

View Full Version : Creating many objects!



vantage
11-22-2007, 04:37 PM
hi, i need some help to try and make many objects appear where they are all a certain distance away from each other all along the x axis, at the moment i have this code, but it just makes one long object not separate ones, can anyone help?


for(int i = 0; i < 10; i++)

{
glPushMatrix();
glTranslatef(i * 10,0.0,0.0);
drawObject();
glPopMatrix();
}

ZbuffeR
11-22-2007, 05:44 PM
Increase the distance between objects ?

use i*100 for example, then find a good value.

vantage
11-24-2007, 11:47 AM
if i use i*100 it just still makes one long object!

ZbuffeR
11-24-2007, 12:11 PM
Screenshot please, I don't understand your problem.

vantage
11-26-2007, 01:47 PM
its alright i figured it out, thanks

ZbuffeR
11-26-2007, 01:59 PM
Just for the record, what was your problem and its solution ?

CRasterImage
11-27-2007, 11:31 AM
Agreed. Post your solution so that future programmers with similar problems can resolve their issues when they find this thread.

It doesn't matter if it was something you feel was silly. We all have "forehead slappers".