#define DEFAULTS "*delay: 30000 \n" \
"*wireframe: False \n" \
+ "*suppressRotationAnimation: True\n" \
# define refresh_ball 0
# define release_ball 0
#define ALPHA_AMT 0.05
/* this should be between 1 and 8 */
-#define DEF_WH "2"
+#define DEF_BOXSIZE "2"
#define DEF_DISSOLVE "False"
#define DEF_FADE "True"
#define DEF_BLUR "True"
};
static argtype vars[] = {
- {&bscale_wh, "boxsize", "Boxsize", DEF_WH, t_Float},
+ {&bscale_wh, "boxsize", "Boxsize", DEF_BOXSIZE, t_Float},
{&do_dissolve, "dissolve", "Dissolve", DEF_DISSOLVE, t_Bool},
{&do_fade, "fade", "Fade", DEF_FADE, t_Bool},
{&do_blur, "blur", "Blur", DEF_BLUR, t_Bool},
swap(a,b);
j = get_rand();
if (*a < 0)
- *a = (j *= -1);
+ *a = j * -1;
else
*a = j;
}
0.0, 0.0, 0.0,
0.0, 2.0, 10.0);
+# ifdef HAVE_MOBILE /* Keep it the same relative size when rotated. */
+ {
+ int o = (int) current_device_rotation();
+ if (o != 0 && o != 180 && o != -180)
+ glScalef (1/h, 1/h, 1/h);
+ }
+# endif
}
static void
int wire = MI_IS_WIREFRAME(mi);
blinkboxstruct *bp;
- if(blinkbox == NULL) {
- if((blinkbox = (blinkboxstruct *) calloc(MI_NUM_SCREENS(mi),
- sizeof (blinkboxstruct))) == NULL)
- return;
- }
+ MI_INIT (mi, blinkbox, NULL);
bp = &blinkbox[MI_SCREEN(mi)];
if ((bp->glx_context = init_GL(mi)) != NULL) {
bp->des_amt = bp->bscale.wh / MAX_COUNT;
}
- bp->glx_context = init_GL(mi);
-
reshape_ball(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
bp->ballList = glGenLists(1);
glNewList(bp->ballList, GL_COMPILE);
glEnable(GL_COLOR_MATERIAL);
glShadeModel(GL_SMOOTH);
- glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
if (! bp->glx_context)
return;
+ mi->polygon_count = 0;
glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context));
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glScalef(2,2,2);
glCallList(bp->ballList);
+ mi->polygon_count += SPHERE_SLICES*SPHERE_STACKS;
} else {
glScalef(2, 2, 2);
glCallList(bp->ballList);
+ mi->polygon_count += SPHERE_SLICES*SPHERE_STACKS;
glScalef(.5, .5, .5);
}
i = 0;
glScalef(bp->bscale.wh,bp->bscale.wh,bp->bscale.d);
}
glCallList(bp->boxList);
+ mi->polygon_count += 6;
glPopMatrix();
bp->sp->counter--;
bp->sp->des_count++;
glPopMatrix();
+ if (mi->fps_p) do_fps (mi);
glFinish();
glXSwapBuffers(dpy, window);