Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::LinuxNativeWindow Struct Reference

#include <LinuxNativeWindow.h>

Public Attributes

Uint32 WindowId = 0
 Native window ID for X11 backends (XCB/Xlib). Must be non-zero to create an X11 surface.
 
void * pDisplay = nullptr
 Display handle: Display* (Xlib) or wl_display* (Wayland).
 
void * pXCBConnection = nullptr
 XCB connection handle: xcb_connection_t* (XCB only).
 
void * pWaylandSurface = nullptr
 Wayland surface handle: wl_surface* (Wayland only).
 

Detailed Description

Platform-native handles for creating a Vulkan surface on Linux (XCB, Xlib, Wayland).

Surface creation selection (in order):

  • XCB (VK_USE_PLATFORM_XCB_KHR): use pXCBConnection + WindowId (both valid) -> vkCreateXcbSurfaceKHR.
  • Xlib (VK_USE_PLATFORM_XLIB_KHR): use pDisplay + WindowId (both valid) and no surface yet -> vkCreateXlibSurfaceKHR.
  • Wayland (VK_USE_PLATFORM_WAYLAND_KHR): use pDisplay + pWaylandSurface (both valid) and no surface yet -> vkCreateWaylandSurfaceKHR.

Notes:

  • Populate only the members for the active backend; leave others null/zero.
  • pDisplay is backend-dependent: Display* (Xlib) or wl_display* (Wayland).