X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fsballs.c;h=833b0001ed7fade4429f3c154c2fbde46413e98a;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hp=420a6a6173a2a68a27fc8a87c193c6dfe77b432b;hpb=6b1c86cf395f59389e4ece4ea8f4bea2c332745b;p=xscreensaver diff --git a/hacks/glx/sballs.c b/hacks/glx/sballs.c index 420a6a61..833b0001 100644 --- a/hacks/glx/sballs.c +++ b/hacks/glx/sballs.c @@ -564,14 +564,26 @@ static void Draw(ModeInfo * mi) glColor3f(0, 0, 0); } glBegin(GL_QUAD_STRIP); +#ifndef USE_IPHONE + /* Letterbox the background image */ glNormal3f(0, 0, 1); glTexCoord2f(0,0); glVertex3f(8, 4.1, -4); glNormal3f(0, 0, 1); glTexCoord2f(0,1); glVertex3f(8, -4.1, -4); glNormal3f(0, 0, 1); glTexCoord2f(1,0); glVertex3f(-8, 4.1, -4); glNormal3f(0, 0, 1); glTexCoord2f(1,1); glVertex3f(-8, -4.1, -4); +#else + /* Fill the iPhone screen. Letterboxing looks dumb there. */ + glNormal3f(0, 0, 1); glTexCoord2f(0,0); glVertex3f(4, 5.2, -4); + glNormal3f(0, 0, 1); glTexCoord2f(0,1); glVertex3f(4, -5.2, -4); + glNormal3f(0, 0, 1); glTexCoord2f(1,0); glVertex3f(-4, 5.2, -4); + glNormal3f(0, 0, 1); glTexCoord2f(1,1); glVertex3f(-4, -5.2, -4); +#endif glEnd(); mi->polygon_count++; + /* Do it twice because we don't track the device's orientation. */ + glRotatef( current_device_rotation(), 0, 0, 1); gltrackball_rotate (sb->trackball); + glRotatef(-current_device_rotation(), 0, 0, 1); /* rotate the balls */ glRotatef(sb->rotm[0], 1.0f, 0.0f, 0.0f); @@ -666,8 +678,6 @@ static void Init(ModeInfo * mi) glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse); glLightfv(GL_LIGHT1, GL_POSITION,LightPosition); glEnable(GL_LIGHT1); - - glClearColor(0, 0, 0, 0); } /*