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

Method init_wayland_connection

cube/cube.cpp:1309–1324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1307#endif
1308#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
1309const char *Demo::init_wayland_connection() {
1310 wayland_library = initialize_wayland();
1311 if (NULL == wayland_library) {
1312 return "Cannot load wayland dynamic library.";
1313 }
1314 wayland_display = wl_display_connect(nullptr);
1315
1316 if (wayland_display == nullptr) {
1317 return "Cannot connect to wayland.";
1318 }
1319
1320 registry = wl_display_get_registry(wayland_display);
1321 wl_registry_add_listener(registry, &registry_listener, this);
1322 wl_display_dispatch(wayland_display);
1323 return NULL;
1324}
1325#endif
1326
1327void Demo::check_and_set_wsi_platform() {

Callers

nothing calls this directly

Calls 1

initialize_waylandFunction · 0.85

Tested by

no test coverage detected