| 75 | } |
| 76 | |
| 77 | inline static int app_create_window(render_application_t* pApp, uint32_t width, uint32_t height) |
| 78 | { |
| 79 | if (SDL_Init(SDL_INIT_EVERYTHING) != 0) return -1; |
| 80 | const char8_t* window_title = pApp->window_title ? pApp->window_title :gCGPUBackendNames[pApp->backend]; |
| 81 | SKR_DECLARE_ZERO(SWindowDescroptor, window_desc); |
| 82 | window_desc.width = width; |
| 83 | window_desc.height = height; |
| 84 | window_desc.flags |= SKR_WINDOW_CENTERED; |
| 85 | window_desc.flags |= SKR_WINDOW_RESIZABLE; |
| 86 | pApp->window_handle = skr_create_window(window_title, &window_desc); |
| 87 | int32_t window_width = 0, window_height = 0; |
| 88 | skr_window_get_extent(pApp->window_handle, &window_width, &window_height); |
| 89 | pApp->window_width = window_width; |
| 90 | pApp->window_height = window_height; |
| 91 | return 0; |
| 92 | } |
| 93 | |
| 94 | inline static int app_resize_window(render_application_t* pApp, uint32_t w, uint32_t h) |
| 95 | { |
no test coverage detected