diff --git a/wgpuglfw/surface_linux.go b/wgpuglfw/surface_linux.go index 69c9a93..f16db7a 100644 --- a/wgpuglfw/surface_linux.go +++ b/wgpuglfw/surface_linux.go @@ -1,4 +1,4 @@ -//go:build (linux || freebsd || netbsd || openbsd) && !android && ((!x11 && !wayland) || (x11 && wayland)) +//go:build (linux || freebsd || netbsd || openbsd) && !android package wgpuglfw diff --git a/wgpuglfw/surface_linux_wayland.go b/wgpuglfw/surface_linux_wayland.go deleted file mode 100644 index 7ebdfb0..0000000 --- a/wgpuglfw/surface_linux_wayland.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build (linux || freebsd || netbsd || openbsd) && !android && !x11 && wayland - -package wgpuglfw - -import ( - "unsafe" - - "github.com/go-gl/glfw/v3.4/glfw" - "github.com/oliverbestmann/webgpu/wgpu" -) - -func GetSurfaceDescriptor(w *glfw.Window) *wgpu.SurfaceDescriptor { - switch glfw.GetPlatform() { - - case glfw.PlatformWayland: - return &wgpu.SurfaceDescriptor{ - WaylandSurface: &wgpu.SurfaceSourceWaylandSurface{ - Display: unsafe.Pointer(glfw.GetWaylandDisplay()), - Surface: unsafe.Pointer(w.GetWaylandWindow()), - }, - } - - default: - panic("Unsupported glfw platform. To support both x11 and wayland, build with --tags wayland,x11") - } -} diff --git a/wgpuglfw/surface_linux_x11.go b/wgpuglfw/surface_linux_x11.go deleted file mode 100644 index e001de9..0000000 --- a/wgpuglfw/surface_linux_x11.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build (linux || freebsd || netbsd || openbsd) && !android && x11 && !wayland - -package wgpuglfw - -import ( - "unsafe" - - "github.com/go-gl/glfw/v3.4/glfw" - "github.com/oliverbestmann/webgpu/wgpu" -) - -func GetSurfaceDescriptor(w *glfw.Window) *wgpu.SurfaceDescriptor { - switch glfw.GetPlatform() { - - case glfw.PlatformX11: - return &wgpu.SurfaceDescriptor{ - XlibWindow: &wgpu.SurfaceSourceXlibWindow{ - Display: unsafe.Pointer(glfw.GetX11Display()), - Window: uint32(w.GetX11Window()), - }, - } - - default: - panic("Unsupported glfw platform. To support both x11 and wayland, build with --tags wayland,x11") - } -}