int win_width, win_height;
float win_aspect;
long time_msec;
+double time_sec;
Mat4 view_matrix;
static bool should_swap;
if(!init_options(argc, argv, 0)) {
return false;
}
+ app_resize(opt.width, opt.height);
+ app_fullscreen(opt.fullscreen);
+
if(init_opengl() == -1) {
return false;
}
glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
- //glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- if(GLEW_ARB_framebuffer_sRGB) {
+ if(opt.srgb && GLEW_ARB_framebuffer_sRGB) {
printf("enabling sRGB framebuffer\n");
glEnable(GL_FRAMEBUFFER_SRGB);
}
draw_backdrop();
app_swap_buffers();
+ app_redraw(); // since we added animation we need to redisplay even in non-VR mode
}
assert(glGetError() == GL_NO_ERROR);
}