~ubuntu-branches/ubuntu/saucy/xscreensaver/saucy

« back to all changes in this revision

Viewing changes to hacks/glx/cubestorm.c

  • Committer: Bazaar Package Importer
  • Author(s): Ted Gould
  • Date: 2008-06-17 09:41:41 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617094141-0un910o2mu76ei4l
Tags: 5.05-1ubuntu1
* Added 70_demo_gtk_stfu_removal.patch to remove some more cases where
  the STFU macro is used such that when the #defines it's used on change
  the compile breaks.  Bad coding style.
* Removing 82_ubuntu-texturl-fridge.patch in favor of updating the
  53_XScreenSaver.ad.in.patch to include the Ubuntu branding instead
  of the Debian branding.  This should make merges easier as long as
  we use something smart like Bazaar.  Also the Debian version has lots
  of good changes like making it work with /etc/alternates which we
  didn't have.
* Removing 54_driver_demogtk.patch as it was merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* cubestorm, Copyright (c) 2003, 2004 Jamie Zawinski <jwz@jwz.org>
 
1
/* cubestorm, Copyright (c) 2003-2008 Jamie Zawinski <jwz@jwz.org>
2
2
 *
3
3
 * Permission to use, copy, modify, distribute, and sell this software and its
4
4
 * documentation for any purpose is hereby granted without fee, provided that
34
34
#define DEF_SPEED       "1.0"
35
35
#define DEF_THICKNESS   "0.06"
36
36
#define DEF_COUNT       "4"
 
37
#define DEF_DBUF        "False"
37
38
 
38
39
typedef struct {
39
40
  rotator *rot;
61
62
static Bool do_wander;
62
63
static GLfloat speed;
63
64
static GLfloat thickness;
 
65
static Bool dbuf_p;
64
66
 
65
67
static XrmOptionDescRec opts[] = {
66
68
  { "-spin",   ".spin",   XrmoptionNoArg, "True" },
68
70
  { "-wander", ".wander", XrmoptionNoArg, "True" },
69
71
  { "+wander", ".wander", XrmoptionNoArg, "False" },
70
72
  { "-speed",  ".speed",  XrmoptionSepArg, 0 },
71
 
  { "-thickness", ".thickness",  XrmoptionSepArg, 0 },
 
73
  { "-db",     ".doubleBuffer", XrmoptionNoArg, "True"},
 
74
  { "+db",     ".doubleBuffer", XrmoptionNoArg, "False"},
 
75
  { "-thickness", ".thickness", XrmoptionSepArg, 0 },
72
76
};
73
77
 
74
78
static argtype vars[] = {
76
80
  {&do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
77
81
  {&speed,     "speed",  "Speed",  DEF_SPEED,  t_Float},
78
82
  {&thickness, "thickness", "Thickness",  DEF_THICKNESS,  t_Float},
 
83
  {&dbuf_p, "doubleBuffer", "DoubleBuffer", DEF_DBUF, t_Bool},
79
84
};
80
85
 
81
86
ENTRYPOINT ModeSpecOpt cube_opts = {countof(opts), opts, countof(vars), vars, NULL};
195
200
    }
196
201
  else if (event->xany.type == ButtonPress &&
197
202
           (event->xbutton.button == Button4 ||
198
 
            event->xbutton.button == Button5))
 
203
            event->xbutton.button == Button5 ||
 
204
            event->xbutton.button == Button6 ||
 
205
            event->xbutton.button == Button7))
199
206
    {
200
207
      gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
201
208
                              !!event->xbutton.state);
308
315
  draw_faces (mi);
309
316
  glEndList ();
310
317
 
 
318
  glDrawBuffer(dbuf_p ? GL_BACK : GL_FRONT);
311
319
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
312
320
}
313
321
 
410
418
  if (mi->fps_p) do_fps (mi);
411
419
  glFinish();
412
420
 
413
 
  glXSwapBuffers(dpy, window);
 
421
  if (dbuf_p)
 
422
    glXSwapBuffers(dpy, window);
414
423
}
415
424
 
416
425
XSCREENSAVER_MODULE_2 ("CubeStorm", cubestorm, cube)