# HG changeset patch # User John Tsiombikas # Date 1299246663 -7200 # Node ID 30c7a5df0523343cf93258f2cdab09840850a9e2 # Parent dc1723a8bf6f1b05d429958b4d47d5e9174f5143 - added focus distance cmdline argument - changed the code to use the regular henge::Scene when using the zbuffer diff -r dc1723a8bf6f -r 30c7a5df0523 src/stereoview.cc --- a/src/stereoview.cc Fri Mar 04 06:51:16 2011 +0200 +++ b/src/stereoview.cc Fri Mar 04 15:51:03 2011 +0200 @@ -28,6 +28,7 @@ static bool use_stereo = false; static bool use_zbuf = true; +static float focus_dist = 1.0; static std::list scn_fnames; static henge::Scene *scn; @@ -91,7 +92,11 @@ return 1; } - scn = new ZScene; + if(use_zbuf) { + scn = new henge::Scene; + } else { + scn = new ZScene; + } std::list::iterator it = scn_fnames.begin(); while(it != scn_fnames.end()) { @@ -110,6 +115,7 @@ rend->set_render_mask(henge::REND_ALL & ~henge::REND_CAM); cam_reset(); + cam_focus_dist(focus_dist); glutMainLoop(); return 0; @@ -122,6 +128,8 @@ static int parse_args(int argc, char **argv) { + char *endptr; + for(int i=1; i\tstereo focus distance\n"); printf(" -h\tprint usage and exit\n"); exit(0); @@ -205,8 +223,6 @@ static void keyb(unsigned char key, int x, int y) { - static float focus_dist = 1.0; - switch(key) { case 27: exit(0);