* Nov 20, 1995 use stdlib's rand()/srand() instead of random()/srand48(), etc.
*/
-/*
+/*
* Modified by Li Wei(liwei@aiar.xjtu.edu.cn) to be able to run in Windows
* 6/13
*
pi = 3.14159265358979323846;
twopi = 2 * pi;
-
+
for (i = 0; i < numc; i++) {
glBegin(GL_QUAD_STRIP);
for (j = 0; j <= numt; j++) {
float Clamp(int iters_left, float t)
{
-
if (iters_left < 3) {
return 0.0;
}
{
int i, j;
GLboolean goIdle;
+ static double t0 = -1.;
+ double t, dt;
+ t = glutGet(GLUT_ELAPSED_TIME) / 1000.;
+ if (t0 < 0.)
+ t0 = t;
+ dt = t - t0;
+
+ if (dt < 1./30.)
+ return;
+
+ t0 = t;
goIdle = GL_TRUE;
for (i = 0; i < RINGS; i++) {
}
glPushMatrix();
-
+
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
gluLookAt(0,0,10, 0,0,0, 0,1,0);
return 10.0 * ( (float) rand() / (float) RAND_MAX - 0.5 );
}
+#if !defined(GLUTCALLBACK)
+#define GLUTCALLBACK
+#endif
+
void GLUTCALLBACK glut_post_redisplay_p(void)
{
glutPostRedisplay();
dests[GREENRING][1] = bottom_y;
dests[GREENRING][2] = bottom_z;
- base = 2.0;
+ base = 2.0;
height = 2.0;
theTorus = glGenLists(1);
glNewList(theTorus, GL_COMPILE);
GLint i;
rgb = GL_TRUE;
- doubleBuffer = GL_FALSE;
+ doubleBuffer = GL_TRUE;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-ci") == 0) {