diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2015-04-24 01:01:49 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2015-04-24 01:50:52 +0300 |
commit | efe41ae7fd1b5b0161678fe7edbd8620a0687035 (patch) | |
tree | 19f17319398befbfba8eb478608c294f7f933d4d | |
parent | 0217e6517f56b85e0cb628a3799ad8e21fe36345 (diff) |
Multiview: Quadbuffer (time sequential) working [debug builds only]
I'll enable this mode in Release builds once I figure out how to best
handle opening files that are saved with the quadbuffer mode.
In fact I think no display mode should be saved/read from a file.
Tested in Linux with NVidia 3D Vision and NVidia 3D Vision Pro with
NVidia Quadro FX 580 and Quadro FX 4600.
(kudos for the Visgraf Lab at IMPA, for having me around with all those
gadgets ;)
Thanks for Cédric Paille (cedricp) for the code snippets and tests -
T44327
-rw-r--r-- | source/blender/windowmanager/intern/wm_stereo.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index 328223645bc..b2cd1f03bc6 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -363,8 +363,7 @@ static bool wm_stereo3d_is_fullscreen_required(eStereoDisplayMode stereo_display { return ELEM(stereo_display, S3D_DISPLAY_SIDEBYSIDE, - S3D_DISPLAY_TOPBOTTOM, - S3D_DISPLAY_PAGEFLIP); + S3D_DISPLAY_TOPBOTTOM); } bool WM_stereo3d_enabled(wmWindow *win, bool skip_stereo3d_check) @@ -463,24 +462,25 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op) /* pageflip requires a new window to be created with the proper OS flags */ if (win->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP) { - if (wm_stereo3d_quadbuffer_supported() == false) { - BKE_report(op->reports, RPT_ERROR, "Quad-buffer not supported by the system"); - win->stereo3d_format->display_mode = display_mode; - return OPERATOR_CANCELLED; - } if (wm_window_duplicate_exec(C, op) == OPERATOR_FINISHED) { - wm_window_close(C, wm, win); - win = wm->windows.last; + if (wm_stereo3d_quadbuffer_supported()) { + wm_window_close(C, wm, win); + BKE_report(op->reports, RPT_INFO, "Quad-buffer window successfully created"); + } + else { + wmWindow *win_new = wm->windows.last; + wm_window_close(C, wm, win_new); + win->stereo3d_format->display_mode = display_mode; + BKE_report(op->reports, RPT_ERROR, "Quad-buffer not supported by the system"); + } } else { BKE_report(op->reports, RPT_ERROR, - "Fail to create a window compatible with time sequential (page-flip) display method"); + "Fail to create a window compatible with the time sequential display method"); win->stereo3d_format->display_mode = display_mode; - return OPERATOR_CANCELLED; } } - - if (wm_stereo3d_is_fullscreen_required(win->stereo3d_format->display_mode)) { + else if (wm_stereo3d_is_fullscreen_required(win->stereo3d_format->display_mode)) { if (!is_fullscreen) { BKE_report(op->reports, RPT_INFO, "Stereo 3D Mode requires the window to be fullscreen"); } |