Parameters used to create a GPUDeviceManager

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

Hierarchy (view full)

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 GPUAdapter | adapter

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 GPUAdapter | adapter or GPUDevice | device

Type declaration

    • (): void
    • Callback to run if there's any error while trying to set up the GPUAdapter | adapter or GPUDevice | device

      Returns void

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

Callback to run whenever the device is lost

Type declaration

    • (info?): void
    • Callback to run whenever the device is lost

      Parameters

      • Optional info: GPUDeviceLostInfo

      Returns void