c - Moving a circle along the X-axis -
i making circle move in x direction only. have drawn circle, not able move in x direction. missing anything?
void display() { int count=0; //counter checking purpose glclear(gl_color_buffer_bit); drawcircle(xxc,yyc,rr); //draws circle glflush(); xxc=xxc+deltax; //increment x coordinate printf("%d",count); //prints value of count if(xxc>100 || xxc<0 ) { //to move between 100 , 0 deltax=-deltax; //for , fro motion of circle } count++; //increment count glutpostredisplay(); }
Comments
Post a Comment