Sorry for my crossposting. I posted the following content on the beginners section, but nobody replied to it. So I hope people here can help me.
The code is like following:
/**********************************/
GLUquadricObj *Bubble;
Bubble=gluNewQuadric();
gluQuadricDrawStyle(Bubble, GLU_FILL);
gluQuadricTexture(Bubble, true);
gluQuadricCallback(Bubble, GLU_ERROR, ErrorCallback);
float radius[4]={2.0, 2.0, 2.0, 2.0};
StartList=glGenLists(4);
glNewList(StartList, GL_COMPILE);
gluSphere(Bubble, radius[0], 10, 10);
glEndList();
glNewList(StartList+1, GL_COMPILE);
gluSphere(Bubble, radius[1], 10, 10);
glEndList();
glNewList(StartList+2, GL_COMPILE);
gluSphere(Bubble, radius[2], 10, 10);
glEndList();
glNewList(StartList+3, GL_COMPILE);
gluSphere(Bubble, radius[3], 10, 10);
glEndList();
/**********************************/
To my surprise, I found that bubbles flickered greatly when the four components of the “radius” are different. But when they are the same, say 2.1, they nearly don’t flicker. Why and how to solve it?
Thanks in advance.