Spec-Zone.ru › Deno 2

GPU

GPU programming and rendering. Efficiently use a device’s graphics processing unit (GPU) for high-performance computations and complex image rendering.

Eg GPUDevice


class Deno.UnsafeWindowSurface

unstable

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

UnsafeWindowSurface(options: { system:
"cocoa"
| "win32"
| "x11"
| "wayland"
; windowHandle: Deno.PointerValue<unknown>; displayHandle: Deno.PointerValue<unknown>; width: number; height: number; }
)
new

Properties

height: number

The height of the window.

width: number

The width of the window.

Methods

getContext(
contextId: OffscreenRenderingContextId,
options?: any,
): OffscreenRenderingContext | null
present(): void

function Deno.webgpu.deviceStartCapture

unstable
deviceStartCapture(device: GPUDevice): void

Starts a frame capture.

This API is useful for debugging issues related to graphics, and makes the captured data available to RenderDoc or XCode (or other software for debugging frames)

Parameters

device: GPUDevice

Return Type

void

function Deno.webgpu.deviceStopCapture

unstable
deviceStopCapture(device: GPUDevice): void

Stops a frame capture.

This API is useful for debugging issues related to graphics, and makes the captured data available to RenderDoc or XCode (or other software for debugging frames)

Parameters

device: GPUDevice

Return Type

void

namespace Deno.webgpu

unstable

The webgpu namespace provides additional APIs that the WebGPU specification does not specify.

Functions

Deno.webgpu.deviceStartCapture

Starts a frame capture.

Deno.webgpu.deviceStopCapture

Stops a frame capture.


© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/api/deno/gpu

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API