projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.37.tar.gz
[xscreensaver]
/
hacks
/
glx
/
flipscreen3d.c
diff --git
a/hacks/glx/flipscreen3d.c
b/hacks/glx/flipscreen3d.c
index 4d6ff301d7292ca380afcebc4f18ef6495b5e367..9bd6995650328eeddb4049edd6812787f740d0e7 100644
(file)
--- a/
hacks/glx/flipscreen3d.c
+++ b/
hacks/glx/flipscreen3d.c
@@
-18,9
+18,11
@@
#define DEFAULTS "*delay: 20000 \n" \
"*showFPS: False \n" \
"*wireframe: False \n" \
#define DEFAULTS "*delay: 20000 \n" \
"*showFPS: False \n" \
"*wireframe: False \n" \
- "*useSHM: True \n"
+ "*useSHM: True \n" \
+ "*suppressRotationAnimation: True\n" \
# define refresh_screenflip 0
# define refresh_screenflip 0
+# define release_screenflip 0
# include "xlockmore.h" /* from the xscreensaver distribution */
# include "gltrackball.h"
#else /* !STANDALONE */
# include "xlockmore.h" /* from the xscreensaver distribution */
# include "gltrackball.h"
#else /* !STANDALONE */
@@
-69,7
+71,7
@@
ENTRYPOINT ModeSpecOpt screenflip_opts = {countof(opts), opts, countof(vars), va
#ifdef USE_MODULES
ModStruct screenflip_description =
#ifdef USE_MODULES
ModStruct screenflip_description =
-{"screenflip", "init_screenflip", "draw_screenflip",
"release_screenflip"
,
+{"screenflip", "init_screenflip", "draw_screenflip",
NULL
,
"draw_screenflip", "init_screenflip", NULL, &screenflip_opts,
1000, 1, 2, 1, 4, 1.0, "",
"Screenflips", 0, NULL};
"draw_screenflip", "init_screenflip", NULL, &screenflip_opts,
1000, 1, 2, 1, 4, 1.0, "",
"Screenflips", 0, NULL};
@@
-304,13
+306,14
@@
static void drawgrid(void)
static void display(Screenflip *c, int wire)
{
int frozen;
static void display(Screenflip *c, int wire)
{
int frozen;
- GLfloat rot = current_device_rotation();
+/* GLfloat rot = current_device_rotation();*/
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
gluLookAt(viewer[0], viewer[1], viewer[2], 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
glPushMatrix();
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
gluLookAt(viewer[0], viewer[1], viewer[2], 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
glPushMatrix();
+/*
glRotatef(rot, 0, 0, 1);
if ((rot > 45 && rot < 135) ||
(rot < -45 && rot > -135))
glRotatef(rot, 0, 0, 1);
if ((rot > 45 && rot < 135) ||
(rot < -45 && rot > -135))
@@
-318,6
+321,7
@@
static void display(Screenflip *c, int wire)
GLfloat s = c->winw / (GLfloat) c->winh;
glScalef (s, 1/s, 1);
}
GLfloat s = c->winw / (GLfloat) c->winh;
glScalef (s, 1/s, 1);
}
+*/
if (inposition(c)) {
frozen = 0;
if (inposition(c)) {
frozen = 0;
@@
-331,9
+335,9
@@
static void display(Screenflip *c, int wire)
if (random() % 2)
c->dgamma = 1/60 - (float)(random() % 100)/3000;
}
if (random() % 2)
c->dgamma = 1/60 - (float)(random() % 100)/3000;
}
- glRotatef(-rot, 0, 0, 1);
+/* glRotatef(-rot, 0, 0, 1);*/
gltrackball_rotate (c->trackball);
gltrackball_rotate (c->trackball);
- glRotatef(rot, 0, 0, 1);
+/* glRotatef(rot, 0, 0, 1);*/
if (rotate) glRotatef(c->rot, c->rx, c->ry, c->rz);
/* update variables with each frame */
if(!c->button_down_p && !c->fadetime) {
if (rotate) glRotatef(c->rot, c->rx, c->ry, c->rz);
/* update variables with each frame */
if(!c->button_down_p && !c->fadetime) {
@@
-435,11
+439,7
@@
ENTRYPOINT void init_screenflip(ModeInfo *mi)
int screen = MI_SCREEN(mi);
Screenflip *c;
int screen = MI_SCREEN(mi);
Screenflip *c;
- if (screenflip == NULL) {
- if ((screenflip = (Screenflip *) calloc(MI_NUM_SCREENS(mi),
- sizeof(Screenflip))) == NULL)
- return;
- }
+ MI_INIT(mi, screenflip, NULL);
c = &screenflip[screen];
c->window = MI_WINDOW(mi);
c = &screenflip[screen];
c->window = MI_WINDOW(mi);
@@
-513,15
+513,6
@@
ENTRYPOINT void draw_screenflip(ModeInfo *mi)
glXSwapBuffers(disp, w);
}
glXSwapBuffers(disp, w);
}
-ENTRYPOINT void release_screenflip(ModeInfo *mi)
-{
- if (screenflip != NULL) {
- (void) free((void *) screenflip);
- screenflip = NULL;
- }
- FreeAllGL(mi);
-}
-
XSCREENSAVER_MODULE_2 ("FlipScreen3D", flipscreen3d, screenflip)
#endif
XSCREENSAVER_MODULE_2 ("FlipScreen3D", flipscreen3d, screenflip)
#endif