From: John Tsiombikas Date: Sun, 13 May 2018 09:47:33 +0000 (+0300) Subject: fixed mirror rendering for goatvr backends which don't use an fbo X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=commitdiff_plain;h=197bafc7f54795243d4c217c2efcf41f01d4100d fixed mirror rendering for goatvr backends which don't use an fbo --- diff --git a/src/app.cc b/src/app.cc index 21e8acc..96e92f3 100644 --- a/src/app.cc +++ b/src/app.cc @@ -426,8 +426,12 @@ void app_display() for(int i=0; i<2; i++) { // for each eye goatvr_draw_eye(i); - vp_width = goatvr_get_fb_eye_width(i); - vp_height = goatvr_get_fb_eye_height(i); + if(goatvr_get_fb_texture()) { + vp_width = goatvr_get_fb_eye_width(i); + vp_height = goatvr_get_fb_eye_height(i); + } else { + vp_width = win_width / 2; + } proj_matrix = goatvr_projection_matrix(i, NEAR_CLIP, FAR_CLIP); glMatrixMode(GL_PROJECTION);