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.16.tar.gz
[xscreensaver]
/
hacks
/
glx
/
tunnel_draw.c
diff --git
a/hacks/glx/tunnel_draw.c
b/hacks/glx/tunnel_draw.c
index 8230ca08a84c8fa154fd7e5a5152016fee940b87..54132fbee12616defe3ff295b12845c7617f8121 100644
(file)
--- a/
hacks/glx/tunnel_draw.c
+++ b/
hacks/glx/tunnel_draw.c
@@
-45,10
+45,7
@@
static const char sccsid[] = "@(#)tunnel_draw.c 5.13 2004/05/25 xlockmore";
#include <math.h>
#ifdef STANDALONE
#include <math.h>
#ifdef STANDALONE
-# ifdef HAVE_COCOA
-# include <OpenGL/gl.h>
-# include <OpenGL/glu.h>
-# else
+# ifndef HAVE_COCOA
# include <GL/gl.h>
# include <GL/glu.h>
# endif
# include <GL/gl.h>
# include <GL/glu.h>
# endif
@@
-207,7
+204,7
@@
static void LoadPath(struct tunnel_state *st)
}
else
{
}
else
{
- path1 = st->path;
+
if (!path1)
path1 = st->path;
path2 = (tnPath *)malloc(sizeof(tnPath));
path1->next = path2;
path1 = path2;
path2 = (tnPath *)malloc(sizeof(tnPath));
path1->next = path2;
path1 = path2;
@@
-345,6
+342,7
@@
void DrawTunnel(struct tunnel_state *st,
/* End of tunnel */
st->ModeX = 1.0;
st->ModeXFlag = 0;
/* End of tunnel */
st->ModeX = 1.0;
st->ModeXFlag = 0;
+ glEnd();
return;
}
cvCatmullRom(p4, t, &op);
return;
}
cvCatmullRom(p4, t, &op);
@@
-377,6
+375,7
@@
void DrawTunnel(struct tunnel_state *st,
/* End of tunnel */
st->ModeX = 1.0;
st->ModeXFlag = 0;
/* End of tunnel */
st->ModeX = 1.0;
st->ModeXFlag = 0;
+ glEnd();
return;
}
return;
}