"*titleFont2: -*-helvetica-medium-r-normal-*-*-120-*-*-*-*-*-*\n" \
"*titleFont3: -*-helvetica-medium-r-normal-*-*-80-*-*-*-*-*-*\n" \
-# define refresh_tangram 0
+# define free_tangram 0
# define release_tangram 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
ENTRYPOINT void reshape_tangram(ModeInfo * mi, int w, int h)
{
- glViewport(0, 0, w, h);
+ int y = 0;
+
+ if (w > h * 5) { /* tiny window: show middle */
+ h = w;
+ y = -h/2;
+ }
+
+ glViewport(0, y, w, h);
}
static void set_camera(tangram_configuration *tp)
{
tangram_configuration *tp;
- if (!tps) {
- tps = (tangram_configuration *)
- calloc(MI_NUM_SCREENS(mi), sizeof(tangram_configuration));
- if (!tps) {
- fprintf(stderr, "%s: out of memory\n", progname);
- exit(1);
- }
- }
+ MI_INIT (mi, tps);
tp = &tps[MI_SCREEN(mi)];