MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / demo_run_xlib

Function demo_run_xlib

cube/cube.c:2899–2919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2897}
2898
2899static void demo_run_xlib(struct demo *demo) {
2900 while (!demo->quit) {
2901 XEvent event;
2902
2903 if (demo->pause) {
2904 XNextEvent(demo->xlib_display, &event);
2905 demo_handle_xlib_event(demo, &event);
2906 }
2907 while (XPending(demo->xlib_display) > 0) {
2908 XNextEvent(demo->xlib_display, &event);
2909 demo_handle_xlib_event(demo, &event);
2910 }
2911 if (demo->initialized && demo->swapchain_ready) {
2912 demo_draw(demo);
2913 if (!demo->is_minimized) {
2914 demo->curFrame++;
2915 }
2916 if (demo->frameCount != INT32_MAX && demo->curFrame == demo->frameCount) demo->quit = true;
2917 }
2918 }
2919}
2920#endif
2921#if defined(VK_USE_PLATFORM_XCB_KHR)
2922static void demo_handle_xcb_event(struct demo *demo, const xcb_generic_event_t *event) {

Callers 1

mainFunction · 0.85

Calls 2

demo_handle_xlib_eventFunction · 0.85
demo_drawFunction · 0.85

Tested by

no test coverage detected