X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Frubikblocks.c;h=ed5e1775a6ef8d5f72e43e2e80e2c5aa8157fb12;hb=8afc01a67be4fbf3f1cc0fce9adf01b5289a21c6;hp=ad4abd30be435bdddcb0b93c8aeaec003d1dd7a7;hpb=5f9c47ca98dd43d8f59b7c27d3fde6edfde4fe21;p=xscreensaver diff --git a/hacks/glx/rubikblocks.c b/hacks/glx/rubikblocks.c index ad4abd30..ed5e1775 100644 --- a/hacks/glx/rubikblocks.c +++ b/hacks/glx/rubikblocks.c @@ -128,7 +128,6 @@ static const GLfloat lmodel_ambient[] = {0.1, 0.1, 0.1, 1.0}; static const GLfloat material_ambient[] = {0.7, 0.7, 0.7, 1.0}; static const GLfloat material_diffuse[] = {0.7, 0.7, 0.7, 1.0}; static const GLfloat material_specular[] = {0.2, 0.2, 0.2, 1.0}; -static const GLfloat zpos = -18.0; /*************************************************************************/ @@ -262,7 +261,12 @@ draw_main(ModeInfo *mi, rubikblocks_conf *cp) glLoadIdentity(); get_position(cp->rot, &x, &y, &z, !cp->button_down); glTranslatef((x-0.5)*6, (y-0.5)*6, -20); + + /* Do it twice because we don't track the device's orientation. */ + glRotatef( current_device_rotation(), 0, 0, 1); gltrackball_rotate(cp->trackball); + glRotatef(-current_device_rotation(), 0, 0, 1); + get_rotation(cp->rot, &x, &y, &z, !cp->button_down); glRotatef(x*360, 1, 0, 0); glRotatef(y*360, 0, 1, 0); @@ -431,6 +435,11 @@ init_gl(ModeInfo *mi) int status; #endif cp->wire = MI_IS_WIREFRAME(mi); + +# ifdef HAVE_JWZGLES /* #### glPolygonMode other than GL_FILL unimplemented */ + cp->wire = 0; +# endif + if(MI_IS_MONO(mi)) tex = False; if(cp->wire) { @@ -461,7 +470,7 @@ init_gl(ModeInfo *mi) glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, material_diffuse); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, material_specular); glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, shininess); - if(!tex) return; + if (!tex) return; glEnable(GL_TEXTURE_2D); #ifdef MIPMAP clear_gl_error();