X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fflipflop.c;h=0d534e53785b81fc5bb92cf48fb35acdcc3fbaa9;hb=f8cf5ac7b2f53510f80a0eaf286a25298be17bfe;hp=ace3b88b1a239a76863b5722a0df5deaeb0dda5e;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/glx/flipflop.c b/hacks/glx/flipflop.c index ace3b88b..0d534e53 100644 --- a/hacks/glx/flipflop.c +++ b/hacks/glx/flipflop.c @@ -265,10 +265,14 @@ display(Flipflopcreen *c) glLightfv(GL_LIGHT0, GL_AMBIENT, amb); + glRotatef(current_device_rotation(), 0, 0, 1); + /** setup perspectif */ glTranslatef(0.0, 0.0, -c->reldist*board_avg_size); glRotatef(22.5, 1.0, 0.0, 0.0); + glRotatef(-current_device_rotation(), 0, 0, 1); gltrackball_rotate (c->trackball); + glRotatef(current_device_rotation(), 0, 0, 1); glRotatef(c->theta*100, 0.0, 1.0, 0.0); glTranslatef(-0.5*board_x_size, 0.0, -0.5*board_y_size); /* Center the board */ @@ -419,8 +423,6 @@ init_flipflop(ModeInfo *mi) c->sheet = (randsheet*) malloc(sizeof(randsheet)); randsheet_create( c->sheet ); - glClearColor(0.0, 0.0, 0.0, 0.0); - clearbits = GL_COLOR_BUFFER_BIT; glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE); @@ -729,12 +731,10 @@ randsheet_new_move( randsheet* rs ) static void randsheet_move( randsheet *rs, float rot ) { - int i, j, index; + int index; float tmp; for( index = 0 ; index < numsquares; index++ ) { - i = rs->xpos[ index ]; - j = rs->ypos[ index ]; switch( rs->direction[ index ] ) { case 0: