24 const bool stereoVisual,
30 m_invalid_window(
false),
31 m_sdl_custom_cursor(nullptr)
35 m_sdl_win = SDL_CreateWindow(title,
40 SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);
49 SDL_RaiseWindow(m_sdl_win);
57 if (m_sdl_custom_cursor) {
58 SDL_FreeCursor(m_sdl_custom_cursor);
63 SDL_DestroyWindow(m_sdl_win);
69#ifdef WITH_OPENGL_BACKEND
70 case GHOST_kDrawingContextTypeOpenGL: {
71 for (
int minor = 6; minor >= 3; --minor) {
81 if (context->initializeDrawingContext()) {
98 if (m_invalid_window ==
false) {
100 m_invalid_window =
true;
110 SDL_SetWindowFullscreen(m_sdl_win, SDL_FALSE);
111 SDL_RestoreWindow(m_sdl_win);
114 SDL_SetWindowFullscreen(m_sdl_win, SDL_FALSE);
115 SDL_MaximizeWindow(m_sdl_win);
118 SDL_MinimizeWindow(m_sdl_win);
121 SDL_SetWindowFullscreen(m_sdl_win, SDL_TRUE);
132 Uint32 flags = SDL_GetWindowFlags(m_sdl_win);
134 if (flags & SDL_WINDOW_FULLSCREEN) {
137 if (flags & SDL_WINDOW_MAXIMIZED) {
140 if (flags & SDL_WINDOW_MINIMIZED) {
153 SDL_SetWindowTitle(m_sdl_win, title);
158 return SDL_GetWindowTitle(m_sdl_win);
169 SDL_GetWindowSize(m_sdl_win, &
w, &h);
170 SDL_GetWindowPosition(m_sdl_win, &x, &y);
181 SDL_GetWindowSize(m_sdl_win,
nullptr, &height);
182 SDL_SetWindowSize(m_sdl_win, width, height);
189 SDL_GetWindowSize(m_sdl_win, &width,
nullptr);
190 SDL_SetWindowSize(m_sdl_win, width, height);
196 SDL_SetWindowSize(m_sdl_win, width, height);
204 SDL_GetWindowPosition(m_sdl_win, &x_win, &y_win);
213 SDL_GetWindowPosition(m_sdl_win, &x_win, &y_win);
221 0xef, 0x01, 0xff, 0x01, 0xff, 0x01, 0x7c, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00,
222 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xff, 0x01, 0xff, 0x01, 0xef, 0x01,
225 0x00, 0x77, 0x00, 0x1c, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,
226 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x1c, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00,
228#define sdl_std_cursor_WIDTH_xterm 9
229#define sdl_std_cursor_HEIGHT_xterm 16
230#define sdl_std_cursor_HOT_X_xterm -3
231#define sdl_std_cursor_HOT_Y_xterm -7
234 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
235 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0x1f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f,
238 0xf8, 0x07, 0xf8, 0x07, 0xf8, 0x07, 0xfc, 0x0f, 0x86, 0x18, 0x83, 0x30, 0x81, 0xe0, 0xc1, 0xe1,
239 0xc1, 0xe1, 0x21, 0xe0, 0x13, 0x30, 0x06, 0x18, 0xfc, 0x0f, 0xf8, 0x07, 0xf8, 0x07, 0xf8, 0x07,
241#define sdl_std_cursor_WIDTH_watch 16
242#define sdl_std_cursor_HEIGHT_watch 16
243#define sdl_std_cursor_HOT_X_watch -15
244#define sdl_std_cursor_HOT_Y_watch -7
247 0xe8, 0x76, 0xfb, 0xdf, 0xfd, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xcf, 0x79, 0xc0, 0x01,
248 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0x80, 0x03,
251 0x88, 0x04, 0x20, 0x0a, 0xc9, 0x32, 0xf2, 0x09, 0x4c, 0x06, 0x43, 0x18, 0x40, 0x00, 0x40, 0x00,
252 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x01, 0x40, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
254#define sdl_std_cursor_WIDTH_umbrella 16
255#define sdl_std_cursor_HEIGHT_umbrella 16
256#define sdl_std_cursor_HOT_X_umbrella -7
257#define sdl_std_cursor_HOT_Y_umbrella -12
260 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f,
261 0xdc, 0x1d, 0xcc, 0x19, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
264 0xff, 0x1f, 0xff, 0x1f, 0x00, 0x00, 0x40, 0x00, 0xe0, 0x00, 0x50, 0x01, 0x48, 0x02, 0x44, 0x04,
265 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
267#define sdl_std_cursor_WIDTH_top_side 15
268#define sdl_std_cursor_HEIGHT_top_side 16
269#define sdl_std_cursor_HOT_X_top_side -6
270#define sdl_std_cursor_HOT_Y_top_side -14
273 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0xfc, 0xf7, 0xfc, 0xf7, 0xfc, 0xf7,
274 0xc0, 0xf7, 0xe0, 0xf7, 0x70, 0xf7, 0x38, 0xf7, 0x1c, 0xf7, 0x0c, 0xf7, 0x00, 0xf0, 0x00, 0xf0,
277 0xff, 0x3f, 0xff, 0x3f, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0xfc, 0x31, 0x80, 0x31, 0x40, 0x31,
278 0x20, 0x31, 0x10, 0x31, 0x08, 0x31, 0x04, 0x31, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
280#define sdl_std_cursor_WIDTH_top_right_corner 16
281#define sdl_std_cursor_HEIGHT_top_right_corner 16
282#define sdl_std_cursor_HOT_X_top_right_corner -13
283#define sdl_std_cursor_HOT_Y_top_right_corner -14
286 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xef, 0x3f, 0xef, 0x3f, 0xef, 0x3f,
287 0xef, 0x03, 0xef, 0x07, 0xef, 0x0e, 0xef, 0x1c, 0xef, 0x38, 0xef, 0x30, 0x0f, 0x00, 0x0f, 0x00,
290 0xff, 0x3f, 0xff, 0x3f, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0xe3, 0x0f, 0x63, 0x00, 0xa3, 0x00,
291 0x23, 0x01, 0x23, 0x02, 0x23, 0x04, 0x23, 0x08, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
293#define sdl_std_cursor_WIDTH_top_left_corner 16
294#define sdl_std_cursor_HEIGHT_top_left_corner 16
295#define sdl_std_cursor_HOT_X_top_left_corner 0
296#define sdl_std_cursor_HOT_Y_top_left_corner -14
299 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00, 0xff, 0x01, 0xff, 0x01, 0x7c, 0x00, 0x7c, 0x00, 0x7c,
300 0x00, 0x7c, 0x00, 0x7c, 0x00, 0xff, 0x01, 0xff, 0x01, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00,
303 0x10, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28,
304 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00,
306#define sdl_std_cursor_WIDTH_sb_v_double_arrow 9
307#define sdl_std_cursor_HEIGHT_sb_v_double_arrow 15
308#define sdl_std_cursor_HOT_X_sb_v_double_arrow -3
309#define sdl_std_cursor_HOT_Y_sb_v_double_arrow -8
351#define sdl_std_cursor_WIDTH_sb_h_double_arrow 15
352#define sdl_std_cursor_HEIGHT_sb_h_double_arrow 9
353#define sdl_std_cursor_HOT_X_sb_h_double_arrow -7
354#define sdl_std_cursor_HOT_Y_sb_h_double_arrow -4
357 0x00, 0xf0, 0x00, 0xf0, 0xc0, 0xf0, 0xc0, 0xf1, 0x80, 0xf3, 0x00, 0xf7, 0xff, 0xff, 0xff,
358 0xff, 0xff, 0xff, 0x00, 0xf7, 0x80, 0xf3, 0xc0, 0xf1, 0xc0, 0xf0, 0x00, 0xf0, 0x00, 0xf0,
361 0x00, 0x30, 0x00, 0x30, 0x40, 0x30, 0x80, 0x30, 0x00, 0x31, 0x00, 0x32, 0xff, 0x37, 0x00,
362 0x32, 0x00, 0x31, 0x80, 0x30, 0x40, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00,
364#define sdl_std_cursor_WIDTH_right_side 16
365#define sdl_std_cursor_HEIGHT_right_side 15
366#define sdl_std_cursor_HOT_X_right_side -13
367#define sdl_std_cursor_HOT_Y_right_side -7
370 0x00, 0x03, 0x80, 0x03, 0xc0, 0x03, 0xe0, 0x03, 0xf0, 0x03, 0xf8, 0x03, 0xfc, 0x03, 0xfe, 0x03,
371 0xff, 0x03, 0xff, 0x03, 0xf8, 0x03, 0xbc, 0x03, 0x3c, 0x03, 0x1e, 0x00, 0x1e, 0x00, 0x0c, 0x00,
374 0x00, 0x80, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf8, 0x00, 0xfc, 0x00, 0xfe, 0x00, 0xff,
375 0x00, 0xf8, 0x00, 0xd8, 0x00, 0x8c, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
377#define sdl_std_cursor_WIDTH_right_ptr 10
378#define sdl_std_cursor_HEIGHT_right_ptr 16
379#define sdl_std_cursor_HOT_X_right_ptr -7
380#define sdl_std_cursor_HOT_Y_right_ptr -14
383 0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0xff, 0x07, 0x8f, 0x07, 0x9f, 0x07, 0xde, 0x07, 0xfc, 0x03,
384 0xf8, 0x01, 0xf8, 0x00, 0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0xfc, 0x01, 0xf8, 0x00, 0x70, 0x00,
387 0x7c, 0x00, 0xfe, 0x00, 0xc7, 0x01, 0x83, 0x01, 0x87, 0x01, 0xc6, 0x01, 0xe0, 0x00, 0x78, 0x00,
388 0x38, 0x00, 0x28, 0x00, 0x28, 0x00, 0xee, 0x00, 0x6c, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00,
390#define sdl_std_cursor_WIDTH_question_arrow 11
391#define sdl_std_cursor_HEIGHT_question_arrow 16
392#define sdl_std_cursor_HOT_X_question_arrow -4
393#define sdl_std_cursor_HOT_Y_question_arrow -8
396 0xf0, 0x03, 0xf8, 0x07, 0xfc, 0x0f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfc, 0x0f, 0xf8, 0x07, 0xf1, 0x83,
397 0xf1, 0xe3, 0xf3, 0xf3, 0xef, 0x39, 0x1e, 0x1e, 0xe0, 0x01, 0xfe, 0xc7, 0xff, 0xff, 0x0f, 0x7c,
400 0xe0, 0x01, 0xf0, 0x03, 0xf8, 0x07, 0xcc, 0x0c, 0xcc, 0x0c, 0xf8, 0x07, 0xf0, 0x03, 0xe0, 0x01,
401 0xe1, 0x21, 0xe1, 0x61, 0xc2, 0x10, 0x1c, 0x0e, 0xe0, 0x01, 0xf8, 0x47, 0x0f, 0x7c, 0x01, 0x20,
403#define sdl_std_cursor_WIDTH_pirate 16
404#define sdl_std_cursor_HEIGHT_pirate 16
405#define sdl_std_cursor_HOT_X_pirate -7
406#define sdl_std_cursor_HOT_Y_pirate -4
409 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x03, 0x8f, 0x03, 0xcf, 0x01, 0xef, 0x00, 0xff, 0xff, 0xff,
410 0xff, 0xff, 0xff, 0xef, 0x00, 0xcf, 0x01, 0x8f, 0x03, 0x0f, 0x03, 0x0f, 0x00, 0x0f, 0x00,
413 0x03, 0x00, 0x03, 0x00, 0x83, 0x00, 0x43, 0x00, 0x23, 0x00, 0x13, 0x00, 0xfb, 0x3f, 0x13,
414 0x00, 0x23, 0x00, 0x43, 0x00, 0x83, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
416#define sdl_std_cursor_WIDTH_left_side 16
417#define sdl_std_cursor_HEIGHT_left_side 15
418#define sdl_std_cursor_HOT_X_left_side 0
419#define sdl_std_cursor_HOT_Y_left_side -7
422 0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01,
423 0xff, 0x03, 0xff, 0x03, 0x7f, 0x00, 0xf7, 0x00, 0xf3, 0x00, 0xe0, 0x01, 0xe0, 0x01, 0xc0, 0x00,
426 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00,
427 0xfe, 0x00, 0x3e, 0x00, 0x36, 0x00, 0x62, 0x00, 0x60, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00,
429#define sdl_std_cursor_WIDTH_left_ptr 10
430#define sdl_std_cursor_HEIGHT_left_ptr 16
431#define sdl_std_cursor_HOT_X_left_ptr -8
432#define sdl_std_cursor_HOT_Y_left_ptr -14
435 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xff, 0xff, 0xff, 0xff,
436 0xff, 0xff, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
439 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x7f, 0xff,
440 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00,
442#define sdl_std_cursor_WIDTH_crosshair 16
443#define sdl_std_cursor_HEIGHT_crosshair 16
444#define sdl_std_cursor_HOT_X_crosshair -7
445#define sdl_std_cursor_HOT_Y_crosshair -8
448 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xcc, 0x19, 0xdc, 0x1d,
449 0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f,
452 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x44, 0x04, 0x48, 0x02,
453 0x50, 0x01, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0xff, 0x1f, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00,
455#define sdl_std_cursor_WIDTH_bottom_side 15
456#define sdl_std_cursor_HEIGHT_bottom_side 16
457#define sdl_std_cursor_HOT_X_bottom_side -6
458#define sdl_std_cursor_HOT_Y_bottom_side -1
461 0x00, 0xf0, 0x00, 0xf0, 0x0c, 0xf7, 0x1c, 0xf7, 0x38, 0xf7, 0x70, 0xf7, 0xe0, 0xf7, 0xc0, 0xf7,
462 0xfc, 0xf7, 0xfc, 0xf7, 0xfc, 0xf7, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
465 0x00, 0x30, 0x00, 0x30, 0x04, 0x31, 0x08, 0x31, 0x10, 0x31, 0x20, 0x31, 0x40, 0x31, 0x80, 0x31,
466 0xfc, 0x31, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0xff, 0x3f, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
468#define sdl_std_cursor_WIDTH_bottom_right_corner 16
469#define sdl_std_cursor_HEIGHT_bottom_right_corner 16
470#define sdl_std_cursor_HOT_X_bottom_right_corner -13
471#define sdl_std_cursor_HOT_Y_bottom_right_corner -1
474 0x0f, 0x00, 0x0f, 0x00, 0xef, 0x30, 0xef, 0x38, 0xef, 0x1c, 0xef, 0x0e, 0xef, 0x07, 0xef, 0x03,
475 0xef, 0x3f, 0xef, 0x3f, 0xef, 0x3f, 0x0f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
478 0x03, 0x00, 0x03, 0x00, 0x23, 0x08, 0x23, 0x04, 0x23, 0x02, 0x23, 0x01, 0xa3, 0x00, 0x63, 0x00,
479 0xe3, 0x0f, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0xff, 0x3f, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00,
481#define sdl_std_cursor_WIDTH_bottom_left_corner 16
482#define sdl_std_cursor_HEIGHT_bottom_left_corner 16
483#define sdl_std_cursor_HOT_X_bottom_left_corner 0
484#define sdl_std_cursor_HOT_Y_bottom_left_corner -1
487 0x00, 0xe0, 0x00, 0xf8, 0x00, 0xfe, 0x80, 0x7f, 0xe0, 0x7f, 0xf8, 0x3f, 0xfc, 0x3f, 0xfc, 0x1f,
488 0xe0, 0x1f, 0xf0, 0x0f, 0xf8, 0x0f, 0x7c, 0x07, 0x3e, 0x07, 0x1f, 0x02, 0x0e, 0x00, 0x04, 0x00,
491 0x00, 0x30, 0x00, 0x3c, 0x00, 0x1f, 0xc0, 0x1f, 0xf0, 0x0f, 0xfc, 0x0f, 0xc0, 0x07, 0xe0, 0x07,
492 0x70, 0x03, 0x38, 0x03, 0x1c, 0x01, 0x0e, 0x01, 0x07, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
494#define sdl_std_cursor_WIDTH_arrow 16
495#define sdl_std_cursor_HEIGHT_arrow 16
496#define sdl_std_cursor_HOT_X_arrow -13
497#define sdl_std_cursor_HOT_Y_arrow -14
505 const Uint8 *data,
const Uint8 *mask,
int w,
int h,
int hot_x,
int hot_y)
507 SDL_Surface *surface;
511 Uint8 datab = 0, maskb = 0;
512 const Uint32 black = 0xFF000000;
513 const Uint32 white = 0xFFFFFFFF;
514 const Uint32 transparent = 0x00000000;
520 surface = SDL_CreateRGBSurface(0,
w, h, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
524 for (y = 0; y < h; ++
y) {
525 pixel = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch);
526 for (x = 0; x <
w; ++
x) {
532 datab = (datab * 0x0202020202ULL & 0x010884422010ULL) % 1023;
533 maskb = (maskb * 0x0202020202ULL & 0x010884422010ULL) % 1023;
536 *pixel++ = (datab & 0x80) ? white : black;
539 *pixel++ = (datab & 0x80) ? white : transparent;
546 cursor = SDL_CreateColorCursor(surface, hot_x, hot_y);
548 SDL_FreeSurface(surface);
557#define DEF_CURSOR(name, ind) \
559 sdl_std_cursor_array[int(ind)] = sdl_ghost_CreateCursor( \
560 sdl_std_cursor_##name, \
561 sdl_std_cursor_mask_##name, \
562 sdl_std_cursor_WIDTH_##name, \
563 sdl_std_cursor_HEIGHT_##name, \
564 (sdl_std_cursor_WIDTH_##name + (sdl_std_cursor_HOT_X_##name)) - 1, \
565 (sdl_std_cursor_HEIGHT_##name + (sdl_std_cursor_HOT_Y_##name)) - 1); \
566 assert(sdl_std_cursor_array[int(ind)] != nullptr); \
606 if (cursor ==
nullptr) {
610 SDL_SetCursor(cursor);
627 if (m_sdl_custom_cursor) {
628 SDL_FreeCursor(m_sdl_custom_cursor);
632 (
const Uint8 *)bitmap, (
const Uint8 *)mask, sizex, sizey, hotX, hotY);
634 SDL_SetCursor(m_sdl_custom_cursor);
640 SDL_ShowCursor(visible);
646 int displayIndex = SDL_GetWindowDisplayIndex(m_sdl_win);
647 if (displayIndex < 0) {
652 if (SDL_GetDisplayDPI(displayIndex, &ddpi,
nullptr,
nullptr) != 0) {
#define GHOST_OPENGL_SDL_RESET_NOTIFICATION_STRATEGY
#define GHOST_OPENGL_SDL_CONTEXT_FLAGS
@ GHOST_kWindowStateMinimized
@ GHOST_kWindowStateMaximized
@ GHOST_kWindowStateNormal
@ GHOST_kWindowStateFullScreen
@ GHOST_kStandardCursorBottomLeftCorner
@ GHOST_kStandardCursorHelp
@ GHOST_kStandardCursorCopy
@ GHOST_kStandardCursorWait
@ GHOST_kStandardCursorTopSide
@ GHOST_kStandardCursorCrosshair
@ GHOST_kStandardCursorLeftRight
@ GHOST_kStandardCursorPencil
@ GHOST_kStandardCursorUpDown
@ GHOST_kStandardCursorBottomSide
@ GHOST_kStandardCursorInfo
@ GHOST_kStandardCursorTopLeftCorner
@ GHOST_kStandardCursorBottomRightCorner
@ GHOST_kStandardCursorDefault
@ GHOST_kStandardCursorRightSide
@ GHOST_kStandardCursorRightArrow
@ GHOST_kStandardCursorTopRightCorner
@ GHOST_kStandardCursorDestroy
@ GHOST_kStandardCursorLeftSide
@ GHOST_kStandardCursorText
@ GHOST_kStandardCursorLeftArrow
#define GHOST_kStandardCursorNumCursors
GHOST_TDrawingContextType
static uchar sdl_std_cursor_mask_right_ptr[]
static uchar sdl_std_cursor_xterm[]
static SDL_Cursor * sdl_ghost_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y)
static uchar sdl_std_cursor_bottom_side[]
static uchar sdl_std_cursor_left_side[]
static uchar sdl_std_cursor_mask_left_side[]
static uchar sdl_std_cursor_arrow[]
static uchar sdl_std_cursor_top_side[]
static uchar sdl_std_cursor_question_arrow[]
static uchar sdl_std_cursor_right_side[]
static uchar sdl_std_cursor_mask_crosshair[]
static uchar sdl_std_cursor_mask_top_right_corner[]
static uchar sdl_std_cursor_mask_bottom_side[]
static uchar sdl_std_cursor_mask_watch[]
static uchar sdl_std_cursor_mask_right_side[]
static SDL_Cursor * sdl_std_cursor_array[int(GHOST_kStandardCursorNumCursors)]
static uchar sdl_std_cursor_top_right_corner[]
static uchar sdl_std_cursor_mask_top_left_corner[]
static SDL_Cursor * getStandardCursorShape(GHOST_TStandardCursor shape)
static uchar sdl_std_cursor_mask_top_side[]
static uchar sdl_std_cursor_mask_left_ptr[]
static uchar sdl_std_cursor_mask_arrow[]
static uchar sdl_std_cursor_mask_bottom_left_corner[]
static uchar sdl_std_cursor_top_left_corner[]
static uchar sdl_std_cursor_umbrella[]
static uchar sdl_std_cursor_sb_v_double_arrow[]
static uchar sdl_std_cursor_left_ptr[]
static uchar sdl_std_cursor_mask_pirate[]
static uchar sdl_std_cursor_bottom_right_corner[]
static uchar sdl_std_cursor_watch[]
static uchar sdl_std_cursor_mask_umbrella[]
static uchar sdl_std_cursor_crosshair[]
static uchar sdl_std_cursor_sb_h_double_arrow[]
static uchar sdl_std_cursor_mask_sb_v_double_arrow[]
static uchar sdl_std_cursor_bottom_left_corner[]
static uchar sdl_std_cursor_mask_xterm[]
static uchar sdl_std_cursor_mask_question_arrow[]
static uchar sdl_std_cursor_mask_bottom_right_corner[]
static uchar sdl_std_cursor_mask_sb_h_double_arrow[]
#define DEF_CURSOR(name, ind)
static uchar sdl_std_cursor_pirate[]
static uchar sdl_std_cursor_right_ptr[]
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void addDirtyWindow(GHOST_WindowSDL *bad_wind)
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) override
std::string getTitle() const override
GHOST_TWindowState getState() const override
void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
GHOST_TSuccess invalidate() override
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape) override
GHOST_TSuccess setClientHeight(uint32_t height) override
GHOST_Context * newDrawingContext(GHOST_TDrawingContextType type) override
GHOST_TSuccess setWindowCustomCursorShape(uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor) override
void getClientBounds(GHOST_Rect &bounds) const override
GHOST_TSuccess setWindowCursorVisibility(bool visible) override
GHOST_TSuccess setClientWidth(uint32_t width) override
GHOST_WindowSDL(GHOST_SystemSDL *system, const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_TDrawingContextType type=GHOST_kDrawingContextTypeNone, const bool stereoVisual=false, const bool exclusive=false, const GHOST_IWindow *parentWindow=nullptr)
GHOST_TSuccess setState(GHOST_TWindowState state) override
GHOST_TSuccess setClientSize(uint32_t width, uint32_t height) override
void getWindowBounds(GHOST_Rect &bounds) const override
uint16_t getDPIHint() override
bool getValid() const override
void setTitle(const char *title) override
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape) override
void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override
GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type) override
GHOST_TSuccess releaseNativeHandles()
virtual bool getValid() const override
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int