trying to generate 50 random sphere in random location.
using random # to find coordinates and using glTranslatef() to move.
the problem is when i am trying to display the next sphere the previous sphere is disappaearing… is there anyway to retain the previous frame into the memory and when the next sphere is drawn update with the previous frame???
for(i=0; i < 50; i++) Draw Sphere 50 times
{
glPushMatrix();
glTranslatef(rand()%50, rand()%30, rand()%10)
glutSolidSphere(rand()%20, 50, 50)
glPopMatrix();
}
Originally posted by ajmrm:
[b]1. trying to generate 50 random sphere in random location.
using random # to find coordinates and using glTranslatef() to move.
the problem is when i am trying to display the next sphere the previous sphere is disappaearing… is there anyway to retain the previous frame into the memory and when the next sphere is drawn update with the previous frame???