chiark
/
gitweb
/
~ian
/
moebius2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
82fc0fa
)
allow turn off hidden line removal
author
Ian Jackson
<ian@davenant.relativity.greenend.org.uk>
Mon, 31 Dec 2007 22:53:31 +0000
(22:53 +0000)
committer
Ian Jackson
<ian@davenant.relativity.greenend.org.uk>
Mon, 31 Dec 2007 22:53:31 +0000
(22:53 +0000)
view.c
patch
|
blob
|
history
diff --git
a/view.c
b/view.c
index e269e25a77e347515ad70a1e3617e96435e8ff3d..72ea2372f81c90d66e372e583d9fb83925e9ae78 100644
(file)
--- a/
view.c
+++ b/
view.c
@@
-114,7
+114,7
@@
static Window window;
static DrawingMode dmred, dmblue, dmwhite;
static const DrawingMode *dmcurrent;
static int wwidth=WSZ, wheight=WSZ, wmindim=WSZ, wmaxdim=WSZ;
static DrawingMode dmred, dmblue, dmwhite;
static const DrawingMode *dmcurrent;
static int wwidth=WSZ, wheight=WSZ, wmindim=WSZ, wmaxdim=WSZ;
-static int ncut, currentbuffer, x11depth, x11screen;
+static int ncut, currentbuffer, x11depth, x11screen
, wireframe
;
XVisualInfo visinfo;
static double sizeadj_scale= 0.3, eyes_apart, scale_wmindim;
XVisualInfo visinfo;
static double sizeadj_scale= 0.3, eyes_apart, scale_wmindim;
@@
-141,8
+141,9
@@
static void drawtriangle(const Triangle *t) {
}
points[3]= points[0];
}
points[3]= points[0];
- XA( XFillPolygon(display,pixmap, dmcurrent->fillgc,
- points,3,Convex,CoordModeOrigin) );
+ if (!wireframe)
+ XA( XFillPolygon(display,pixmap, dmcurrent->fillgc,
+ points,3,Convex,CoordModeOrigin) );
XA( XDrawLines(display,pixmap, dmcurrent->linegc,
points, 4,CoordModeOrigin) );
}
XA( XDrawLines(display,pixmap, dmcurrent->linegc,
points, 4,CoordModeOrigin) );
}
@@
-530,6
+531,11
@@
static void event_key(XKeyEvent *e) {
}
if (!strcmp(buf,"q")) exit(0);
}
if (!strcmp(buf,"q")) exit(0);
+ if (!strcmp(buf,"w")) {
+ wireframe= !wireframe;
+ show();
+ return;
+ }
if (!strcmp(buf,"d")) {
eyes_apart= eyes_apart>0 ? eyes_apart_min : eyes_apart_preferred;
show();
if (!strcmp(buf,"d")) {
eyes_apart= eyes_apart>0 ? eyes_apart_min : eyes_apart_preferred;
show();