Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_window.c
| Context not available. | |||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BIF_gl.h" | |||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| Context not available. | |||||
| #include "GPU_draw.h" | #include "GPU_draw.h" | ||||
| #include "GPU_extensions.h" | #include "GPU_extensions.h" | ||||
| #include "GPU_init_exit.h" | |||||
| #include "GPU_glew.h" | |||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| Context not available. | |||||
| /* nothing to do for 'temp' windows, | /* nothing to do for 'temp' windows, | ||||
| * because WM_window_open_temp always sets window title */ | * because WM_window_open_temp always sets window title */ | ||||
| } | } | ||||
| else if (win->ghostwin) { | else { | ||||
| /* this is set to 1 if you don't have startup.blend open */ | /* this is set to 1 if you don't have startup.blend open */ | ||||
| if (G.save_over && G.main->name[0]) { | if (G.save_over && G.main->name[0]) { | ||||
| char str[sizeof(G.main->name) + 24]; | char str[sizeof(G.main->name) + 24]; | ||||
| Context not available. | |||||
| } | } | ||||
| /* belongs to below */ | /* belongs to below */ | ||||
| static void wm_window_add_ghostwindow(wmWindowManager *wm, const char *title, wmWindow *win) | static void wm_window_add_ghostwindow(const char *title, wmWindow *win) | ||||
| { | { | ||||
| GHOST_WindowHandle ghostwin; | GHOST_WindowHandle ghostwin; | ||||
| static int multisamples = -1; | static int multisamples = -1; | ||||
| Context not available. | |||||
| if (ghostwin) { | if (ghostwin) { | ||||
| GHOST_RectangleHandle bounds; | GHOST_RectangleHandle bounds; | ||||
| /* the new window has already been made drawable upon creation */ | |||||
| wm->windrawable = win; | |||||
| /* needed so we can detect the graphics card below */ | /* needed so we can detect the graphics card below */ | ||||
| GPU_init(); | GPU_extensions_init(); | ||||
| win->ghostwin = ghostwin; | win->ghostwin = ghostwin; | ||||
| GHOST_SetWindowUserData(ghostwin, win); /* pointer back */ | GHOST_SetWindowUserData(ghostwin, win); /* pointer back */ | ||||
| Context not available. | |||||
| wm_init_state.start_x = 0; | wm_init_state.start_x = 0; | ||||
| wm_init_state.start_y = 0; | wm_init_state.start_y = 0; | ||||
| #ifdef WITH_X11 /* X11 */ | |||||
| #if !defined(__APPLE__) && !defined(WIN32) /* X11 */ | |||||
| /* X11, start maximized but use default sane size */ | /* X11, start maximized but use default sane size */ | ||||
| wm_init_state.size_x = min_ii(wm_init_state.size_x, WM_WIN_INIT_SIZE_X); | wm_init_state.size_x = min_ii(wm_init_state.size_x, WM_WIN_INIT_SIZE_X); | ||||
| wm_init_state.size_y = min_ii(wm_init_state.size_y, WM_WIN_INIT_SIZE_Y); | wm_init_state.size_y = min_ii(wm_init_state.size_y, WM_WIN_INIT_SIZE_Y); | ||||
| Context not available. | |||||
| wm_init_state.override_flag &= ~WIN_OVERRIDE_WINSTATE; | wm_init_state.override_flag &= ~WIN_OVERRIDE_WINSTATE; | ||||
| } | } | ||||
| wm_window_add_ghostwindow(wm, "Blender", win); | wm_window_add_ghostwindow("Blender", win); | ||||
| } | } | ||||
| /* happens after fileread */ | /* happens after fileread */ | ||||
| if (win->eventstate == NULL) | if (win->eventstate == NULL) | ||||
| Context not available. | |||||
| GHOST_SetSwapInterval(win->ghostwin, interval); | GHOST_SetSwapInterval(win->ghostwin, interval); | ||||
| } | } | ||||
| bool wm_window_get_swap_interval(wmWindow *win, int *intervalOut) | int wm_window_get_swap_interval (wmWindow *win) | ||||
| { | { | ||||
| return GHOST_GetSwapInterval(win->ghostwin, intervalOut); | return GHOST_GetSwapInterval(win->ghostwin); | ||||
| } | } | ||||
| Context not available. | |||||