Blender
V3.3
|
#include <stdlib.h>
#include <string.h>
#include "DNA_listBase.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_report.h"
#include "GHOST_C-api.h"
#include "ED_screen.h"
#include "GPU_capabilities.h"
#include "GPU_immediate.h"
#include "GPU_texture.h"
#include "GPU_viewport.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm.h"
#include "wm_draw.h"
#include "wm_window.h"
#include "UI_interface.h"
#include "UI_resources.h"
Go to the source code of this file.
Classes | |
struct | Stereo3dData |
Typedefs | |
typedef struct Stereo3dData | Stereo3dData |
Functions | |
void | wm_stereo3d_draw_sidebyside (wmWindow *win, int view) |
void | wm_stereo3d_draw_topbottom (wmWindow *win, int view) |
static bool | wm_stereo3d_is_fullscreen_required (eStereoDisplayMode stereo_display) |
bool | WM_stereo3d_enabled (wmWindow *win, bool skip_stereo3d_check) |
void | wm_stereo3d_mouse_offset_apply (wmWindow *win, int r_mouse_xy[2]) |
static bool | wm_stereo3d_set_properties (bContext *UNUSED(C), wmOperator *op) |
static void | wm_stereo3d_set_init (bContext *C, wmOperator *op) |
int | wm_stereo3d_set_exec (bContext *C, wmOperator *op) |
int | wm_stereo3d_set_invoke (bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) |
void | wm_stereo3d_set_draw (bContext *UNUSED(C), wmOperator *op) |
bool | wm_stereo3d_set_check (bContext *UNUSED(C), wmOperator *UNUSED(op)) |
void | wm_stereo3d_set_cancel (bContext *UNUSED(C), wmOperator *op) |
typedef struct Stereo3dData Stereo3dData |
Definition at line 42 of file wm_stereo.c.
References Stereo3dFormat::flag, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRI_FAN, GPU_SHADER_2D_IMAGE, GPU_vertformat_attr_add(), immAttr2f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertex2f(), immVertexFormat(), pos, S3D_SIDEBYSIDE_CROSSEYED, wmWindow::stereo3d_format, STEREO_LEFT_ID, view, WM_window_pixels_x(), and WM_window_pixels_y().
Referenced by wm_draw_window().
Definition at line 92 of file wm_stereo.c.
References GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRI_FAN, GPU_SHADER_2D_IMAGE, GPU_vertformat_attr_add(), immAttr2f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertex2f(), immVertexFormat(), pos, STEREO_LEFT_ID, view, WM_window_pixels_x(), and WM_window_pixels_y().
Referenced by wm_draw_window().
Definition at line 141 of file wm_stereo.c.
References Stereo3dFormat::display_mode, ED_screen_stereo3d_required(), GHOST_GetWindowState(), GHOST_kWindowStateFullScreen, wmWindow::ghostwin, scene, wmWindow::stereo3d_format, wm_stereo3d_is_fullscreen_required(), WM_window_get_active_scene(), and WM_window_get_active_screen().
Referenced by button_activate_state(), view3d_stereo3d_active(), wm_draw_window(), and wm_stereo3d_mouse_offset_apply().
|
static |
Definition at line 136 of file wm_stereo.c.
References ELEM, S3D_DISPLAY_SIDEBYSIDE, and S3D_DISPLAY_TOPBOTTOM.
Referenced by WM_stereo3d_enabled(), and wm_stereo3d_set_exec().
If needed, adjust r_mouse_xy so that drawn cursor and handled mouse position are matching visually.
Definition at line 165 of file wm_stereo.c.
References Stereo3dFormat::display_mode, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, wmWindow::stereo3d_format, WM_stereo3d_enabled(), WM_window_pixels_x(), and WM_window_pixels_y().
Referenced by wm_event_add_ghostevent().
void wm_stereo3d_set_cancel | ( | bContext * | UNUSEDC, |
wmOperator * | op | ||
) |
Definition at line 398 of file wm_stereo.c.
References wmOperator::customdata, MEM_freeN, and NULL.
Referenced by WM_OT_stereo3d_set().
bool wm_stereo3d_set_check | ( | bContext * | UNUSEDC, |
wmOperator * | UNUSEDop | ||
) |
Definition at line 390 of file wm_stereo.c.
Referenced by WM_OT_stereo3d_set().
void wm_stereo3d_set_draw | ( | bContext * | UNUSEDC, |
wmOperator * | op | ||
) |
Definition at line 353 of file wm_stereo.c.
References col, wmOperator::customdata, Stereo3dFormat::display_mode, wmOperator::layout, NULL, RNA_pointer_create(), S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE, S3D_DISPLAY_PAGEFLIP, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, Stereo3dData::stereo3d_format, uiItemR(), uiLayoutColumn(), uiLayoutSetPropDecorate(), and uiLayoutSetPropSep().
Referenced by WM_OT_stereo3d_set().
int wm_stereo3d_set_exec | ( | bContext * | C, |
wmOperator * | op | ||
) |
Definition at line 255 of file wm_stereo.c.
References BKE_report(), C, CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), wmOperator::customdata, Stereo3dFormat::display_mode, G, GPU_stereo_quadbuffer_support(), MEM_freeN, NC_WINDOW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, RPT_INFO, S3D_DISPLAY_PAGEFLIP, SCREENNORMAL, bScreen::state, wmWindow::stereo3d_format, Stereo3dData::stereo3d_format, WM_event_add_notifier(), wm_stereo3d_is_fullscreen_required(), wm_stereo3d_set_init(), wm_stereo3d_set_properties(), wm_window_close(), wm_window_copy_test(), WM_window_get_active_screen(), and WM_window_is_fullscreen().
Referenced by WM_OT_stereo3d_set(), and wm_stereo3d_set_invoke().
|
static |
Definition at line 244 of file wm_stereo.c.
References C, CTX_wm_window(), wmOperator::customdata, MEM_callocN, wmWindow::stereo3d_format, and Stereo3dData::stereo3d_format.
Referenced by wm_stereo3d_set_exec(), and wm_stereo3d_set_invoke().
int wm_stereo3d_set_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
const wmEvent * | UNUSEDevent | ||
) |
Definition at line 343 of file wm_stereo.c.
References C, WM_operator_props_dialog_popup(), wm_stereo3d_set_exec(), wm_stereo3d_set_init(), and wm_stereo3d_set_properties().
Referenced by WM_OT_stereo3d_set().
|
static |
Definition at line 194 of file wm_stereo.c.
References Stereo3dFormat::anaglyph_type, wmOperator::customdata, Stereo3dFormat::display_mode, Stereo3dFormat::flag, Stereo3dFormat::interlace_type, wmOperator::ptr, RNA_property_boolean_get(), RNA_property_enum_get(), RNA_property_is_set(), RNA_struct_find_property(), S3D_INTERLACE_SWAP, S3D_SIDEBYSIDE_CROSSEYED, and Stereo3dData::stereo3d_format.
Referenced by wm_stereo3d_set_exec(), and wm_stereo3d_set_invoke().