You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
417 B
21 lines
417 B
2 years ago
|
import WebGPUBuffer from './WebGPUBuffer.js';
|
||
|
import { GPUBindingType } from './constants.js';
|
||
|
|
||
|
class WebGPUStorageBuffer extends WebGPUBuffer {
|
||
|
|
||
|
constructor( name, attribute ) {
|
||
|
|
||
|
super( name, GPUBindingType.StorageBuffer, attribute.array );
|
||
|
|
||
|
this.isStorageBuffer = true;
|
||
|
|
||
|
this.usage |= GPUBufferUsage.VERTEX | GPUBufferUsage.STORAGE;
|
||
|
|
||
|
this.attribute = attribute;
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
export default WebGPUStorageBuffer;
|