TypedBuffer¶
Overview¶
A GPUBuffer that is typed to a specific type, and can be used to encode/decode values to/from it.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class TypedBuffer¶
Constructor¶
new TypedBuffer( buffer : GPUBuffer, type : ConcreteType<T> )¶
Instance Methods¶
setValue( device : GPUDevice, value : T )¶
getValue( encoder : GPUCommandEncoder, bufferLogger : BufferLogger ) : Promise<T>¶
dispose()¶
Static Methods¶
createArray( deviceContext : DeviceContext, type : ConcreteType<T>, size : number, outOfRangeElement? : T ) : TypedBuffer<T[]>¶
createArrayFromData( deviceContext : DeviceContext, type : ConcreteType<T>, data : T[] ) : TypedBuffer<T[]>¶
wrapArray( buffer : GPUBuffer, type : ConcreteType<T>, outOfRangeElement? : T, size ) : TypedBuffer<T[]>¶
Source Code¶
See the source for TypedBuffer.ts in the alpenglow repository.