static bool bnstate[16];
static int prev_x, prev_y;
+static float fov = 60.0;
+
bool app_init(int argc, char **argv)
{
if(!init_options(argc, argv, "vrfileman.conf")) {
// regular monoscopic mode
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ Mat4 mat;
+ mat.perspective(deg_to_rad(fov), win_aspect, 0.1, 200.0);
+ glMatrixMode(GL_PROJECTION);
+ glLoadMatrixf(mat[0]);
+
view_matrix = Mat4::identity;
view_matrix.pre_rotate_x(deg_to_rad(cam_phi));
view_matrix.pre_rotate_y(deg_to_rad(cam_theta));
{
glViewport(0, 0, x, y);
- Mat4 mat;
- mat.perspective(deg_to_rad(60), win_aspect, 0.1, 200.0);
-
- glMatrixMode(GL_PROJECTION);
- glLoadMatrixf(mat[0]);
-
if(opt.vr) {
goatvr_set_fb_size(x, y, 1.0);
}
goatvr_recenter();
}
break;
+
+ case '-':
+ fov += 1.0;
+ if(fov > 160.0) fov = 160.0;
+ break;
+
+ case '=':
+ fov -= 1.0;
+ if(fov < 0.0) fov = 0.0;
+ break;
}
}
}