Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_stereo.c
| Show First 20 Lines • Show All 364 Lines • ▼ Show 20 Lines | 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; | 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)) { | if ((skip_stereo3d_check == false) && (ED_screen_stereo3d_required(screen) == false)) { | ||||
| return 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 (wm_stereo3d_is_fullscreen_required(win->stereo3d_format->display_mode)) { | ||||
| if (GHOST_GetWindowState(win->ghostwin) != GHOST_kWindowStateFullScreen) { | return GHOST_GetWindowState(win->ghostwin) == GHOST_kWindowStateFullScreen; | ||||
| return false; | |||||
| } | |||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| /************************** Stereo 3D operator **********************************/ | /************************** Stereo 3D operator **********************************/ | ||||
| typedef struct Stereo3dData { | typedef struct Stereo3dData { | ||||
| Stereo3dFormat stereo3d_format; | Stereo3dFormat stereo3d_format; | ||||
| ▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines | |||||