X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fjuggler3d.c;h=6cf1b09ff0cb7b5fa1520981781397224faa1551;hb=5f9c47ca98dd43d8f59b7c27d3fde6edfde4fe21;hp=5697ed263af32c44e98aed77dde5e2e6320627c5;hpb=f0261d8acab611f3433160e4f07367b870439739;p=xscreensaver diff --git a/hacks/glx/juggler3d.c b/hacks/glx/juggler3d.c index 5697ed26..6cf1b09f 100644 --- a/hacks/glx/juggler3d.c +++ b/hacks/glx/juggler3d.c @@ -2318,11 +2318,12 @@ show_ring(ModeInfo *mi, unsigned long color, Trace *s) glNormal3f (0, 0, j*1); glBegin (wire_p ? GL_LINES : GL_QUAD_STRIP); for (i = 0; i < slices + (wire_p ? 0 : 1); i++) { + GLfloat th, cth, sth; glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, (i % (slices/3) ? gcolor1 : gcolor2)); - GLfloat th = i * width; - GLfloat cth = cos(th); - GLfloat sth = sin(th); + th = i * width; + cth = cos(th); + sth = sin(th); glVertex3f (cth * ra, sth * ra, z); glVertex3f (cth * rb, sth * rb, z); polys++; @@ -2653,6 +2654,7 @@ init_juggle (ModeInfo * mi) load_font (mi->dpy, "titleFont", &sp->mode_font, &sp->font_dlist); reshape_juggle (mi, MI_WIDTH(mi), MI_HEIGHT(mi)); + clear_gl_error(); /* WTF? sometimes "invalid op" from glViewport! */ if (!wire) {