summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--med.c2
-rw-r--r--vis.c14
2 files changed, 12 insertions, 4 deletions
diff --git a/med.c b/med.c
index 4ba9d30..25dccec 100644
--- a/med.c
+++ b/med.c
@@ -802,7 +802,7 @@ threadmain(int argc, char *argv[])
placecamera(cam, scene, camcfg.p, camcfg.lookat, camcfg.up);
light.p = Pt3(0,100,100,1);
light.c = Pt3(1,1,1,1);
- light.type = LIGHT_POINT;
+ light.type = LightPoint;
tsampler = neartexsampler;
kctl = emalloc(sizeof *kctl);
diff --git a/vis.c b/vis.c
index e43ac08..c9d674e 100644
--- a/vis.c
+++ b/vis.c
@@ -733,6 +733,13 @@ rmb(void)
for(idx = 0; idx < nelem(cams); idx++)
memset(&cams[idx]->stats, 0, sizeof(cams[idx]->stats));
}
+// if(om.buttons == mctl->buttons){
+// Point p;
+//
+// p = subpt(mctl->xy, om.xy);
+// maincam->view->p.x += p.x;
+// maincam->view->p.y += p.y;
+// }
unlockdisplay(display);
nbsend(drawc, nil);
}
@@ -1023,7 +1030,8 @@ fprint(2, "screen %R\n", screenb->r);
else
cams[i] = Cam(Rect(0,0,fbw,fbh), rctl,
camcfgs[i].ptype, camcfgs[i].fov, camcfgs[i].clipn, camcfgs[i].clipf);
-
+ if(cams[i] == nil)
+ sysfatal("Cam: %r");
placecamera(cams[i], scene, camcfgs[i].p, camcfgs[i].lookat, camcfgs[i].up);
cams[i]->view->setscale(cams[i]->view, scale, scale);
@@ -1039,8 +1047,8 @@ fprint(2, "cam%d off %v scalex %g scaley %g\n", i+1, cams[i]->view->p, cams[i]->
light.p = Pt3(0,100,100,1);
// light.dir = Vec3(0,-1,0);
light.c = Pt3(1,1,1,1);
- light.type = LIGHT_POINT;
-// light.type = LIGHT_SPOT;
+ light.type = LightPoint;
+// light.type = LightSpot;
// light.θu = 30*DEG;
// light.θp = 5*DEG;
tsampler = neartexsampler;