Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_playanim.c
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
| #include "BLF_api.h" | #include "BLF_api.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "ED_datafiles.h" /* for fonts */ | #include "ED_datafiles.h" /* for fonts */ | ||||
| #include "GHOST_C-api.h" | #include "GHOST_C-api.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "wm_window_private.h" | |||||
| #include "WM_api.h" /* only for WM_main_playanim */ | #include "WM_api.h" /* only for WM_main_playanim */ | ||||
| #ifdef WITH_AUDASPACE | #ifdef WITH_AUDASPACE | ||||
| # include <AUD_Device.h> | # include <AUD_Device.h> | ||||
| # include <AUD_Handle.h> | # include <AUD_Handle.h> | ||||
| # include <AUD_Sound.h> | # include <AUD_Sound.h> | ||||
| # include <AUD_Special.h> | # include <AUD_Special.h> | ||||
| ▲ Show 20 Lines • Show All 1,265 Lines • ▼ Show 20 Lines | #endif | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| static void playanim_window_open(const char *title, int posx, int posy, int sizex, int sizey) | static void playanim_window_open(const char *title, int posx, int posy, int sizex, int sizey) | ||||
| { | { | ||||
| GHOST_GLSettings glsettings = {0}; | GHOST_GLSettings glsettings = {0}; | ||||
| const eGPUBackendType gpu_backend = GPU_backend_type_selection_get(); | |||||
| glsettings.context_type = wm_ghost_drawing_context_type(gpu_backend); | |||||
| uint32_t scr_w, scr_h; | uint32_t scr_w, scr_h; | ||||
| GHOST_GetMainDisplayDimensions(g_WS.ghost_system, &scr_w, &scr_h); | GHOST_GetMainDisplayDimensions(g_WS.ghost_system, &scr_w, &scr_h); | ||||
| posy = (scr_h - posy - sizey); | posy = (scr_h - posy - sizey); | ||||
| g_WS.ghost_window = GHOST_CreateWindow(g_WS.ghost_system, | g_WS.ghost_window = GHOST_CreateWindow(g_WS.ghost_system, | ||||
| NULL, | NULL, | ||||
| title, | title, | ||||
| posx, | posx, | ||||
| posy, | posy, | ||||
| sizex, | sizex, | ||||
| sizey, | sizey, | ||||
| /* Could optionally start full-screen. */ | /* Could optionally start full-screen. */ | ||||
| GHOST_kWindowStateNormal, | GHOST_kWindowStateNormal, | ||||
| false, | false, | ||||
| GHOST_kDrawingContextTypeOpenGL, | |||||
| glsettings); | glsettings); | ||||
| } | } | ||||
| static void playanim_window_zoom(PlayState *ps, const float zoom_offset) | static void playanim_window_zoom(PlayState *ps, const float zoom_offset) | ||||
| { | { | ||||
| int sizex, sizey; | int sizex, sizey; | ||||
| /* int ofsx, ofsy; */ /* UNUSED */ | /* int ofsx, ofsy; */ /* UNUSED */ | ||||
| ▲ Show 20 Lines • Show All 528 Lines • Show Last 20 Lines | |||||