Parameters used to create a GPUDeviceManager.

interface GPUDeviceManagerParams {
    production?: boolean;
    adapterOptions?: GPURequestAdapterOptions;
    autoRender?: boolean;
    label?: string;
    onError?: () => void;
    onDeviceLost?: (info?: GPUDeviceLostInfo) => void;
    onDeviceDestroyed?: (info?: GPUDeviceLostInfo) => void;
}

Hierarchy (View Summary)

Properties

production?: boolean

Flag indicating whether we're running the production mode or not. If not, useful warnings could be logged to the console.

adapterOptions?: GPURequestAdapterOptions

Additional options to use when requesting an adapter.

autoRender?: boolean

Whether the GPUDeviceManager should create its own requestAnimationFrame loop to render or not.

label?: string

The label of the GPUDeviceManager, used to create the GPUDevice for debugging purpose.

onError?: () => void

Callback to run if there's any error while trying to set up the adapter or device.

onDeviceLost?: (info?: GPUDeviceLostInfo) => void

Callback to run whenever the device is lost.

onDeviceDestroyed?: (info?: GPUDeviceLostInfo) => void

Callback to run whenever the device has been intentionally destroyed.