glMatrixMode(GL_PROJECTION);
glLoadMatrixf(mat[0]);
+
+ if(opt.vr) {
+ goatvr_set_fb_size(x, y, 1.0);
+ }
}
void app_keyboard(int key, bool pressed)
app_quit();
break;
+ case 'f':
+ if(!opt.vr || should_swap) {
+ /* we take the need to swap as a signal that our window is not managed
+ * by some VR compositor, and therefore it's safe to fullscreen without
+ * upsetting the VR rendering output
+ */
+ opt.fullscreen = !opt.fullscreen;
+ app_fullscreen(opt.fullscreen);
+ }
+ break;
+
case ' ':
if(opt.vr) {
goatvr_recenter();
// the following functions are implemented by the window system backend
void app_resize(int x, int y);
-void app_fullscreen(int fs);
+void app_fullscreen(bool fs);
void app_quit();
void app_redraw();
void app_swap_buffers();
SDL_SetWindowSize(win, x, y);
}
-void app_fullscreen(int fs)
+void app_fullscreen(bool fs)
{
SDL_SetWindowFullscreen(win, fs ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
}