Ende.UnsafeWindowSurface
class ยท experimental
class Ende.UnsafeWindowSurfaceUNSTABLE: New API, yet to be vetted.
Creates a presentable WebGPU surface from given window and display handles.
The parameters correspond to the table below:
| system | winHandle | displayHandle |
|---|---|---|
| "cocoa" (macOS) | - | NSView* |
| "win32" (Windows) | HWND |
HINSTANCE |
| "x11" (Linux) | Xlib Window |
Xlib Display* |
| "wayland" (Linux) | wl_surface* |
wl_display* |
Constructors
constructor
new UnsafeWindowSurface(options: { system: "cocoa" | "win32" | "x11" | "wayland"; windowHandle: Ende.PointerValue<unknown>; displayHandle: Ende.PointerValue<unknown>; width: number; height: number })Properties
height
height: numberThe height of the window.
width
width: numberThe width of the window.
Methods
getContext
getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | nullpresent
present(): void