GPUDevice: phương thức createTexture()

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 createTexture() của giao diện GPUDevice tạo một GPUTexture để lưu dữ liệu texture dùng trong các thao tác dựng hình GPU.

Cú pháp

js
createTexture(descriptor)

Tham số

descriptor

Đối tượng mô tả texture cần tạo.

Giá trị trả về

Một thể hiện GPUTexture.

Đặc tả

Specification
WebGPU
# dom-gpudevice-createtexture

Tương thích trình duyệt