MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / app_create_window

Function app_create_window

samples/common/common/render_application.h:77–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77inline 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
94inline static int app_resize_window(render_application_t* pApp, uint32_t w, uint32_t h)
95{

Callers 1

initializeFunction · 0.85

Calls 2

skr_create_windowFunction · 0.85
skr_window_get_extentFunction · 0.85

Tested by

no test coverage detected