| 331 | /////////////////////////////////////////// |
| 332 | |
| 333 | platform_win_t platform_win_get_existing(platform_surface_ surface_type) { |
| 334 | const sk_settings_t* settings = sk_get_settings_ref(); |
| 335 | window_t* win = &web_window; |
| 336 | |
| 337 | // Not all windows need a swapchain, but here's where we make 'em for those |
| 338 | // that do. |
| 339 | if (surface_type == platform_surface_swapchain) { |
| 340 | skg_tex_fmt_ color_fmt = skg_tex_fmt_rgba32_linear; |
| 341 | skg_tex_fmt_ depth_fmt = (skg_tex_fmt_)render_preferred_depth_fmt(); |
| 342 | |
| 343 | win->swapchain = skg_swapchain_create(nullptr, color_fmt, depth_fmt, settings->flatscreen_width, settings->flatscreen_height); |
| 344 | win->has_swapchain = true; |
| 345 | |
| 346 | log_diagf("Created swapchain: %dx%d color:%s depth:%s", win->swapchain.width, win->swapchain.height, render_fmt_name((tex_format_)color_fmt), render_fmt_name((tex_format_)depth_fmt)); |
| 347 | } |
| 348 | return 1; |
| 349 | } |
| 350 | |
| 351 | /////////////////////////////////////////// |
| 352 |
no test coverage detected