GPUDevice: phương thức createBuffer()
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
Phương thức createBuffer() của giao diện GPUDevice tạo một GPUBuffer để lưu dữ liệu thô dùng trong các thao tác GPU.
Cú pháp
js
createBuffer(descriptor)
Tham số
descriptor-
Đối tượng mô tả buffer cần tạo.
Giá trị trả về
Một thể hiện GPUBuffer.
Đặc tả
| Specification |
|---|
| WebGPU> # dom-gpudevice-createbuffer> |