[Bf-blender-cvs] [efe41ae] master: Multiview: Quadbuffer (time sequential) working [debug builds only]

Dalai Felinto noreply at git.blender.org
Fri Apr 24 00:51:04 CEST 2015


Commit: efe41ae7fd1b5b0161678fe7edbd8620a0687035
Author: Dalai Felinto
Date:   Thu Apr 23 19:01:49 2015 -0300
Branches: master
https://developer.blender.org/rBefe41ae7fd1b5b0161678fe7edbd8620a0687035

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

===================================================================

M	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 3282236..b2cd1f0 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");
 		}




More information about the Bf-blender-cvs mailing list