- {"-light", ".extrusion.light", XrmoptionNoArg, "true" },
- {"+light", ".extrusion.light", XrmoptionNoArg, "false" },
- {"-wire", ".extrusion.wire", XrmoptionNoArg, "true" },
- {"+wire", ".extrusion.wire", XrmoptionNoArg, "false" },
- {"-texture", ".extrusion.texture", XrmoptionNoArg, "true" },
- {"+texture", ".extrusion.texture", XrmoptionNoArg, "false" },
- {"-texture", ".extrusion.texture", XrmoptionNoArg, "true" },
- {"+texture_quality", ".extrusion.texture", XrmoptionNoArg, "false" },
- {"-texture_quality", ".extrusion.texture", XrmoptionNoArg, "true" },
- {"+mipmap", ".extrusion.mipmap", XrmoptionNoArg, "false" },
- {"-mipmap", ".extrusion.mipmap", XrmoptionNoArg, "true" },
- {"-name", ".extrusion.name", XrmoptionSepArg, 0 },
- {"-image", ".extrusion.image", XrmoptionSepArg, 0 },
+ {"-light", ".extrusion.light", XrmoptionNoArg, "true" },
+ {"+light", ".extrusion.light", XrmoptionNoArg, "false" },
+ {"-wire", ".extrusion.wire", XrmoptionNoArg, "true" },
+ {"+wire", ".extrusion.wire", XrmoptionNoArg, "false" },
+ {"-texture", ".extrusion.texture", XrmoptionNoArg, "true" },
+ {"+texture", ".extrusion.texture", XrmoptionNoArg, "false" },
+ {"-texture", ".extrusion.texture", XrmoptionNoArg, "true" },
+ {"+texture_quality", ".extrusion.texture", XrmoptionNoArg, "false" },
+ {"-texture_quality", ".extrusion.texture", XrmoptionNoArg, "true" },
+ {"+mipmap", ".extrusion.mipmap", XrmoptionNoArg, "false" },
+ {"-mipmap", ".extrusion.mipmap", XrmoptionNoArg, "true" },
+ {"-name", ".extrusion.name", XrmoptionSepArg, 0 },
+ {"-image", ".extrusion.image", XrmoptionSepArg, 0 },
- {&do_light, "light", "Light", DEF_LIGHT, t_Bool},
- {&do_wire, "wire", "Wire", DEF_WIRE, t_Bool},
- {&do_texture, "texture", "Texture", DEF_TEXTURE, t_Bool},
- {&do_texture_quality, "texture_quality", "Texture_Quality", DEF_TEXTURE_QUALITY, t_Bool},
- {&do_mipmap, "mipmap", "Mipmap", DEF_MIPMAP, t_Bool},
- {&which_name, "name", "Name", DEF_NAME, t_String},
- {&which_image, "image", "Image", DEF_IMAGE, t_String},
+ {&do_light, "light", "Light", DEF_LIGHT, t_Bool},
+ {&do_wire, "wire", "Wire", DEF_WIRE, t_Bool},
+ {&do_texture, "texture", "Texture", DEF_TEXTURE, t_Bool},
+ {&do_tex_qual, "texture_quality", "Texture_Quality", DEF_TEX_QUAL, t_Bool},
+ {&do_mipmap, "mipmap", "Mipmap", DEF_MIPMAP, t_Bool},
+ {&which_name, "name", "Name", DEF_NAME, t_String},
+ {&which_image, "image", "Image", DEF_IMAGE, t_String},
/* with texture_quality, the min and mag filters look *much* nice but are *much* slower */
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
/* with texture_quality, the min and mag filters look *much* nice but are *much* slower */
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
- glXMakeCurrent(display, window, *(gp->glx_context));
+ glPushMatrix();
+
+ gltrackball_rotate (gp->trackball);
+
+ get_rotation (gp->rot, &x, &y, &z,
+ !(gp->button_down_p || gp->button2_down_p));
+ glRotatef (x * 360, 1.0, 0.0, 0.0);
+ glRotatef (y * 360, 0.0, 1.0, 0.0);
+ glRotatef (z * 360, 0.0, 0.0, 1.0);
+ {
+ float scale = (max_lastx - min_lastx);
+ get_position (gp->rot, &x, &y, &z,
+ !(gp->button_down_p || gp->button2_down_p));
+ lastx = x * scale + min_lastx + gp->mouse_dx;
+ lasty = y * scale + min_lasty + gp->mouse_dy;
+ }
+
+ glScalef(0.5, 0.5, 0.5);
+
+ /* glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, spec); */
+ /* glMateriali (GL_FRONT_AND_BACK, GL_SHININESS, shiny); */
+
+ glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color);
+ glFrontFace(GL_CCW);
+
+ funcs_ptr[screensaver_number].DrawStuff();
+
+ glPopMatrix();
+
+ else if (event->xany.type == ButtonPress &&
+ (event->xbutton.button == Button4 ||
+ event->xbutton.button == Button5))
+ {
+ gltrackball_mousewheel (gp->trackball, event->xbutton.button, 10,
+ !!event->xbutton.state);
+ return True;
+ }
+ else if (event->xany.type == ButtonPress &&
+ event->xbutton.button != Button1)
+ {
+ gp->button2_down_p = True;
+ gp->mouse_start_x = gp->mouse_x = event->xbutton.x;
+ gp->mouse_start_y = gp->mouse_y = event->xbutton.y;
+ return True;
+ }
+ else if (event->xany.type == ButtonRelease &&
+ event->xbutton.button != Button1)
+ {
+ gp->button2_down_p = False;
+ return True;
+ }