webgpuDisposePersistentResources function

void webgpuDisposePersistentResources(
  1. List<WebGpuTexture> textures,
  2. List<GPUBuffer> buffers
)

Destroys every tracked texture and buffer and empties both lists. See GraphicsDevice.dispose.

Implementation

void webgpuDisposePersistentResources(
  List<WebGpuTexture> textures,
  List<GPUBuffer> buffers,
) {
  for (final texture in textures) {
    texture.texture.destroy();
  }
  textures.clear();
  for (final buffer in buffers) {
    buffer.destroy();
  }
  buffers.clear();
}