mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Switched X11 and Wayland
This commit is contained in:
Vendored
+9
-9
@@ -12,7 +12,7 @@ GetSurface :: proc(instance: wgpu.Instance, window: ^sdl3.Window) -> wgpu.Surfac
|
|||||||
sdl3.PROP_WINDOW_X11_DISPLAY_POINTER,
|
sdl3.PROP_WINDOW_X11_DISPLAY_POINTER,
|
||||||
nil,
|
nil,
|
||||||
)
|
)
|
||||||
surface := sdl3.GetNumberProperty(
|
x_window := sdl3.GetNumberProperty(
|
||||||
sdl3.GetWindowProperties(window),
|
sdl3.GetWindowProperties(window),
|
||||||
sdl3.PROP_WINDOW_X11_WINDOW_NUMBER,
|
sdl3.PROP_WINDOW_X11_WINDOW_NUMBER,
|
||||||
0,
|
0,
|
||||||
@@ -20,10 +20,10 @@ GetSurface :: proc(instance: wgpu.Instance, window: ^sdl3.Window) -> wgpu.Surfac
|
|||||||
return wgpu.InstanceCreateSurface(
|
return wgpu.InstanceCreateSurface(
|
||||||
instance,
|
instance,
|
||||||
&wgpu.SurfaceDescriptor {
|
&wgpu.SurfaceDescriptor {
|
||||||
nextInChain = &wgpu.SurfaceDescriptorFromWaylandSurface {
|
nextInChain = &wgpu.SurfaceDescriptorFromXlibWindow {
|
||||||
chain = {sType = .SurfaceDescriptorFromWaylandSurface},
|
chain = {sType = .SurfaceDescriptorFromXlibWindow},
|
||||||
display = display,
|
display = display,
|
||||||
surface = surface,
|
window = u64(x_window),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@@ -33,18 +33,18 @@ GetSurface :: proc(instance: wgpu.Instance, window: ^sdl3.Window) -> wgpu.Surfac
|
|||||||
sdl3.PROP_WINDOW_WAYLAND_DISPLAY_POINTER,
|
sdl3.PROP_WINDOW_WAYLAND_DISPLAY_POINTER,
|
||||||
nil,
|
nil,
|
||||||
)
|
)
|
||||||
surface := sdl3.GetPointerProperty(
|
w_surface := sdl3.GetPointerProperty(
|
||||||
sdl3.GetWindowProperties(window),
|
sdl3.GetWindowProperties(window),
|
||||||
sdl3.PROP_WINDOW_WAYLAND_SURFACE_POINTER,
|
sdl3.PROP_WINDOW_WAYLAND_SURFACE_POINTER,
|
||||||
0,
|
nil,
|
||||||
)
|
)
|
||||||
return wgpu.InstanceCreateSurface(
|
return wgpu.InstanceCreateSurface(
|
||||||
instance,
|
instance,
|
||||||
&wgpu.SurfaceDescriptor {
|
&wgpu.SurfaceDescriptor {
|
||||||
nextInChain = &wgpu.SurfaceDescriptorFromXlibWindow {
|
nextInChain = &wgpu.SurfaceDescriptorFromWaylandSurface {
|
||||||
chain = {sType = .SurfaceDescriptorFromXlibWindow},
|
chain = {sType = .SurfaceDescriptorFromWaylandSurface},
|
||||||
display = display,
|
display = display,
|
||||||
window = u64(window),
|
surface = u64(w_surface),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user