From 54b824106b68ba9850569d4052db97d54a109ac5 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sat, 13 Jun 2015 11:23:01 -0300 Subject: Multi-View: Some Stereo 3D modes require a special drawing all the time some 3d methods change the window arrangment, thus they shouldn't toggle on/off just because there is no 3d elements being drawn The optimized solution would be to draw only the left eye in those cases, but there is some issue going on with that, so this commit will do for now. --- source/blender/windowmanager/intern/wm_stereo.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source/blender/windowmanager/intern/wm_stereo.c') diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index 639c6c1d4e6..13567518774 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -370,14 +370,20 @@ bool WM_stereo3d_enabled(wmWindow *win, bool skip_stereo3d_check) { bScreen *screen = win->screen; + /* some 3d methods change the window arrangment, thus they shouldn't + * toggle on/off just because there is no 3d elements being drawn */ + if (wm_stereo3d_is_fullscreen_required(win->stereo3d_format->display_mode)) { + return GHOST_GetWindowState(win->ghostwin) == GHOST_kWindowStateFullScreen; + } + if ((skip_stereo3d_check == false) && (ED_screen_stereo3d_required(screen) == false)) { return false; } + /* some 3d methods change the window arrangment, thus they shouldn't + * toggle on/off just because there is no 3d elements being drawn */ if (wm_stereo3d_is_fullscreen_required(win->stereo3d_format->display_mode)) { - if (GHOST_GetWindowState(win->ghostwin) != GHOST_kWindowStateFullScreen) { - return false; - } + return GHOST_GetWindowState(win->ghostwin) == GHOST_kWindowStateFullScreen; } return true; -- cgit v1.2.3