Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_stereo.c
| Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| return ELEM(stereo_display, | return ELEM(stereo_display, | ||||
| S3D_DISPLAY_SIDEBYSIDE, | S3D_DISPLAY_SIDEBYSIDE, | ||||
| S3D_DISPLAY_TOPBOTTOM); | S3D_DISPLAY_TOPBOTTOM); | ||||
| } | } | ||||
| bool WM_stereo3d_enabled(wmWindow *win, bool skip_stereo3d_check) | bool WM_stereo3d_enabled(wmWindow *win, bool skip_stereo3d_check) | ||||
| { | { | ||||
| bScreen *screen = win->screen; | const bScreen *screen = WM_window_get_active_screen(win); | ||||
| const Scene *scene = WM_window_get_active_scene(win); | |||||
| /* some 3d methods change the window arrangement, thus they shouldn't | /* some 3d methods change the window arrangement, thus they shouldn't | ||||
| * toggle on/off just because there is no 3d elements being drawn */ | * toggle on/off just because there is no 3d elements being drawn */ | ||||
| if (wm_stereo3d_is_fullscreen_required(win->stereo3d_format->display_mode)) { | if (wm_stereo3d_is_fullscreen_required(win->stereo3d_format->display_mode)) { | ||||
| return GHOST_GetWindowState(win->ghostwin) == GHOST_kWindowStateFullScreen; | return GHOST_GetWindowState(win->ghostwin) == GHOST_kWindowStateFullScreen; | ||||
| } | } | ||||
| if ((skip_stereo3d_check == false) && (ED_screen_stereo3d_required(screen) == false)) { | if ((skip_stereo3d_check == false) && (ED_screen_stereo3d_required(screen, scene) == false)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* some 3d methods change the window arrangement, thus they shouldn't | /* some 3d methods change the window arrangement, thus they shouldn't | ||||
| * toggle on/off just because there is no 3d elements being drawn */ | * toggle on/off just because there is no 3d elements being drawn */ | ||||
| if (wm_stereo3d_is_fullscreen_required(win->stereo3d_format->display_mode)) { | if (wm_stereo3d_is_fullscreen_required(win->stereo3d_format->display_mode)) { | ||||
| return GHOST_GetWindowState(win->ghostwin) == GHOST_kWindowStateFullScreen; | return GHOST_GetWindowState(win->ghostwin) == GHOST_kWindowStateFullScreen; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | if (prev_display_mode == S3D_DISPLAY_PAGEFLIP && | ||||
| } | } | ||||
| else { | else { | ||||
| BKE_report(op->reports, RPT_ERROR, | BKE_report(op->reports, RPT_ERROR, | ||||
| "Failed to create a window without quad-buffer support, you may experience flickering"); | "Failed to create a window without quad-buffer support, you may experience flickering"); | ||||
| ok = false; | ok = false; | ||||
| } | } | ||||
| } | } | ||||
| else if (win_src->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP) { | else if (win_src->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP) { | ||||
| /* ED_screen_duplicate() can't handle other cases yet T44688 */ | const bScreen *screen = WM_window_get_active_screen(win_src); | ||||
| if (win_src->screen->state != SCREENNORMAL) { | |||||
| /* ED_workspace_layout_duplicate() can't handle other cases yet T44688 */ | |||||
| if (screen->state != SCREENNORMAL) { | |||||
| BKE_report(op->reports, RPT_ERROR, | BKE_report(op->reports, RPT_ERROR, | ||||
| "Failed to switch to Time Sequential mode when in fullscreen"); | "Failed to switch to Time Sequential mode when in fullscreen"); | ||||
| ok = false; | ok = false; | ||||
| } | } | ||||
| /* pageflip requires a new window to be created with the proper OS flags */ | /* pageflip requires a new window to be created with the proper OS flags */ | ||||
| else if ((win_dst = wm_window_copy_test(C, win_src))) { | else if ((win_dst = wm_window_copy_test(C, win_src))) { | ||||
| if (wm_stereo3d_quadbuffer_supported()) { | if (wm_stereo3d_quadbuffer_supported()) { | ||||
| BKE_report(op->reports, RPT_INFO, "Quad-buffer window successfully created"); | BKE_report(op->reports, RPT_INFO, "Quad-buffer window successfully created"); | ||||
| ▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines | |||||