X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fhypertorus.c;h=4b81aef9ddb7f9e5e853c6f4be8e3730d6488bab;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=f957f5d28249154fff4d16334ce135cb01731972;hpb=c141c2b05e374757b6499d12bb8a6d4d943b1529;p=xscreensaver diff --git a/hacks/glx/hypertorus.c b/hacks/glx/hypertorus.c index f957f5d2..4b81aef9 100644 --- a/hacks/glx/hypertorus.c +++ b/hacks/glx/hypertorus.c @@ -87,6 +87,7 @@ static const char sccsid[] = "@(#)hypertorus.c 1.2 05/09/28 xlockmore"; #ifdef STANDALONE # define DEFAULTS "*delay: 25000 \n" \ "*showFPS: False \n" \ + "*suppressRotationAnimation: True\n" \ # define refresh_hypertorus 0 # include "xlockmore.h" /* from the xscreensaver distribution */ @@ -95,9 +96,6 @@ static const char sccsid[] = "@(#)hypertorus.c 1.2 05/09/28 xlockmore"; #endif /* !STANDALONE */ #ifdef USE_GL -#ifndef HAVE_COCOA -# include -#endif #include "gltrackball.h" @@ -505,6 +503,17 @@ static int hypertorus(ModeInfo *mi, double umin, double umax, double vmin, } } +#if 0 /* #### not working */ +# ifdef HAVE_MOBILE /* Keep it the same relative size when rotated. */ + { + GLfloat h = MI_HEIGHT(mi) / (GLfloat) MI_WIDTH(mi); + int o = (int) current_device_rotation(); + if (o != 0 && o != 180 && o != -180) + glScalef (1/h, 1/h, 1/h); + } +# endif +#endif + skew = num_spirals; ur = umax-umin; vr = vmax-vmin; @@ -631,16 +640,12 @@ static void init(ModeInfo *mi) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); +# ifdef HAVE_JWZGLES /* #### glPolygonMode other than GL_FILL unimplemented */ if (display_mode == DISP_WIREFRAME) - { - glDisable(GL_DEPTH_TEST); - glShadeModel(GL_FLAT); - glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); - glDisable(GL_LIGHTING); - glDisable(GL_LIGHT0); - glDisable(GL_BLEND); - } - else if (display_mode == DISP_SURFACE) + display_mode = DISP_SURFACE; +# endif + + if (display_mode == DISP_SURFACE) { glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); @@ -676,7 +681,7 @@ static void init(ModeInfo *mi) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA,GL_ONE); } - else + else /* display_mode == DISP_WIREFRAME */ { glDisable(GL_DEPTH_TEST); glShadeModel(GL_FLAT); @@ -834,8 +839,8 @@ ENTRYPOINT void init_hypertorus(ModeInfo *mi) hp = &hyper[MI_SCREEN(mi)]; - hp->trackballs[0] = gltrackball_init(); - hp->trackballs[1] = gltrackball_init(); + hp->trackballs[0] = gltrackball_init(True); + hp->trackballs[1] = gltrackball_init(True); hp->current_trackball = 0; hp->button_pressed = False;