Skip to main content

Function: setGpuMemoryLimit()

setGpuMemoryLimit(__namedParameters): void

Sets the GPU memory limit of auto, the user's choice, for example from a dialog after a failure. The choice stays, also after a reload, until another choice or resetGpuMemoryLimit. A hard limit from the configuration still wins (see getGpuMemoryLimit).

The change applies at once: VOLUME_TEXTURE_LIMITS_CHANGED fires, so a lower limit provisions the textures on screen smaller, and a higher one provisions them larger. It works while the WebGL context is lost or WebGL is unavailable, because it only writes the record.

Parameters​

• __namedParameters

• __namedParameters.bytes: number

• __namedParameters.hard?: boolean = false

Returns​

void

Defined in​

packages/core/src/utilities/gpuSettingsPresets.ts:361