summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vis.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/vis.c b/vis.c
index 85aa01c..c9aca97 100644
--- a/vis.c
+++ b/vis.c
@@ -600,15 +600,27 @@ mmb(void)
{
enum {
MOVELIGHT,
+ SP0,
TSNEAREST,
TSBILINEAR,
+ SP1,
SHOWNORMALS,
+ SP2,
+ CULLFRONT,
+ CULLBACK,
+ CULLNO,
};
static char *items[] = {
[MOVELIGHT] "move light",
+ "",
[TSNEAREST] "use nearest sampler",
[TSBILINEAR] "use bilinear sampler",
+ "",
[SHOWNORMALS] "show normals",
+ "",
+ [CULLFRONT] "cull front faces",
+ [CULLBACK] "cull back faces",
+ [CULLNO] "no culling",
nil,
};
static Menu menu = { .item = items };
@@ -637,6 +649,15 @@ mmb(void)
case SHOWNORMALS:
shownormals ^= 1;
break;
+ case CULLFRONT:
+ maincam->cullmode = CullFront;
+ break;
+ case CULLBACK:
+ maincam->cullmode = CullBack;
+ break;
+ case CULLNO:
+ maincam->cullmode = CullNone;
+ break;
}
unlockdisplay(display);
nbsend(drawc, nil);