webgpuDataBuffer.js 494 B

123456789101112131415
  1. import { DataBuffer } from "../../Buffers/dataBuffer.js";
  2. /** @internal */
  3. export class WebGPUDataBuffer extends DataBuffer {
  4. constructor(resource, capacity = 0) {
  5. super();
  6. // Used to make sure the buffer is not recreated twice after a context loss/restoration
  7. this.engineId = -1;
  8. this.capacity = capacity;
  9. this._buffer = resource;
  10. }
  11. get underlyingResource() {
  12. return this._buffer;
  13. }
  14. }
  15. //# sourceMappingURL=webgpuDataBuffer.js.map