Skip to content

Class: UniformGPUBuffer

CPU write, GPU read-only transmission buffer Can only be copied and written in the cpu coder usage GPUBufferUsage.UNIFORM & GPUBufferUsage.COPY_DST & GPUBufferUsage.COPY_SRC GPUBufferUsage

Hierarchy

  • GPUBufferBase

    UniformGPUBuffer

Constructors

Properties

Methods

Constructors

constructor

new UniformGPUBuffer(size, data?): UniformGPUBuffer

Parameters

NameType
sizenumber
data?Float32Array

Returns

UniformGPUBuffer

Overrides

GPUBufferBase.constructor

Defined in

src/gfx/graphics/webGpu/core/buffer/UniformGPUBuffer.ts:10

Properties

bufferType

bufferType: GPUBufferType

Inherited from

GPUBufferBase.bufferType

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:20


buffer

buffer: GPUBuffer

Inherited from

GPUBufferBase.buffer

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:21


memory

memory: MemoryDO

Inherited from

GPUBufferBase.memory

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:22


memoryNodes

memoryNodes: Map<string | number, MemoryInfo>

Inherited from

GPUBufferBase.memoryNodes

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:23


seek

seek: number

Inherited from

GPUBufferBase.seek

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:24


outFloat32Array

outFloat32Array: Float32Array

Inherited from

GPUBufferBase.outFloat32Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:25


byteSize

byteSize: number

Inherited from

GPUBufferBase.byteSize

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:26


usage

usage: number

Inherited from

GPUBufferBase.usage

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:27


visibility

visibility: number

Inherited from

GPUBufferBase.visibility

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:28

Methods

debug

debug(): void

Returns

void

Inherited from

GPUBufferBase.debug

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:41


reset

reset(clean?, size?, data?): void

Parameters

NameTypeDefault value
cleanbooleanfalse
sizenumber0
data?Float32Arrayundefined

Returns

void

Inherited from

GPUBufferBase.reset

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:44


setBoolean

setBoolean(name, v): void

Parameters

NameType
namestring
vboolean

Returns

void

Inherited from

GPUBufferBase.setBoolean

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:52


readBoole

readBoole(name): boolean

Parameters

NameType
namestring

Returns

boolean

Inherited from

GPUBufferBase.readBoole

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:62


setFloat

setFloat(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setFloat

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:70


getFloat

getFloat(name): number

Parameters

NameType
namestring

Returns

number

Inherited from

GPUBufferBase.getFloat

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:79


setInt8

setInt8(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setInt8

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:87


getInt8

getInt8(name): number

Parameters

NameType
namestring

Returns

number

Inherited from

GPUBufferBase.getInt8

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:96


setInt16

setInt16(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setInt16

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:104


getInt16

getInt16(name): number

Parameters

NameType
namestring

Returns

number

Inherited from

GPUBufferBase.getInt16

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:113


setInt32

setInt32(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setInt32

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:121


getInt32

getInt32(name): number

Parameters

NameType
namestring

Returns

number

Inherited from

GPUBufferBase.getInt32

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:130


setUint8

setUint8(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setUint8

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:138


getUint8

getUint8(name): number

Parameters

NameType
namestring

Returns

number

Inherited from

GPUBufferBase.getUint8

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:147


setUint16

setUint16(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setUint16

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:156


getUint16

getUint16(name): number

Parameters

NameType
namestring

Returns

number

Inherited from

GPUBufferBase.getUint16

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:165


setUint32

setUint32(name, v): void

Parameters

NameType
namestring
vnumber

Returns

void

Inherited from

GPUBufferBase.setUint32

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:173


getUint32

getUint32(name): number

Parameters

NameType
namestring

Returns

number

Inherited from

GPUBufferBase.getUint32

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:182


setVector2

setVector2(name, v2): void

Parameters

NameType
namestring
v2Vector2

Returns

void

Inherited from

GPUBufferBase.setVector2

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:190


getVector2

getVector2(name): Vector2

Parameters

NameType
namestring

Returns

Vector2

Inherited from

GPUBufferBase.getVector2

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:199


setVector3

setVector3(name, v3): void

Parameters

NameType
namestring
v3Vector3

Returns

void

Inherited from

GPUBufferBase.setVector3

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:207


getVector3

getVector3(name): Vector3

Parameters

NameType
namestring

Returns

Vector3

Inherited from

GPUBufferBase.getVector3

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:216


setVector4

setVector4(name, v4): void

Parameters

NameType
namestring
v4Vector4 | Quaternion

Returns

void

Inherited from

GPUBufferBase.setVector4

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:224


getVector4

getVector4(name): Vector4

Parameters

NameType
namestring

Returns

Vector4

Inherited from

GPUBufferBase.getVector4

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:233


setVector4Array

setVector4Array(name, v4Array): void

Parameters

NameType
namestring
v4ArrayVector3[] | Vector4[] | Quaternion[]

Returns

void

Inherited from

GPUBufferBase.setVector4Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:241


setColor

setColor(name, color): void

Parameters

NameType
namestring
colorColor

Returns

void

Inherited from

GPUBufferBase.setColor

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:250


getColor

getColor(name): Color

Parameters

NameType
namestring

Returns

Color

Inherited from

GPUBufferBase.getColor

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:259


setColorArray

setColorArray(name, colorArray): void

Parameters

NameType
namestring
colorArrayColor[]

Returns

void

Inherited from

GPUBufferBase.setColorArray

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:267


setMatrix

setMatrix(name, mat): void

Parameters

NameType
namestring
matMatrix4

Returns

void

Inherited from

GPUBufferBase.setMatrix

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:276


setMatrixArray

setMatrixArray(name, mats): void

Parameters

NameType
namestring
matsMatrix4[]

Returns

void

Inherited from

GPUBufferBase.setMatrixArray

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:285


setArray

setArray(name, data): void

Parameters

NameType
namestring
datanumber[]

Returns

void

Inherited from

GPUBufferBase.setArray

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:297


setFloat32Array

setFloat32Array(name, data): void

Parameters

NameType
namestring
dataFloat32Array

Returns

void

Inherited from

GPUBufferBase.setFloat32Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:306


setInt32Array

setInt32Array(name, data): void

Parameters

NameType
namestring
dataInt32Array

Returns

void

Inherited from

GPUBufferBase.setInt32Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:315


setUint32Array

setUint32Array(name, data): void

Parameters

NameType
namestring
dataUint32Array

Returns

void

Inherited from

GPUBufferBase.setUint32Array

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:325


setStruct

setStruct<T>(c, index, data, property?): void

Type parameters

NameType
Textends Struct

Parameters

NameType
c() => T
indexnumber
dataany
property?string

Returns

void

Inherited from

GPUBufferBase.setStruct

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:334


setStructArray

setStructArray<T>(c, dataList, property?): void

Type parameters

NameType
Textends Struct

Parameters

NameType
c() => T
dataListany[]
property?string

Returns

void

Inherited from

GPUBufferBase.setStructArray

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:390


clean

clean(): void

Returns

void

Inherited from

GPUBufferBase.clean

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:403


apply

apply(): void

Returns

void

Inherited from

GPUBufferBase.apply

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:408


mapAsyncWrite

mapAsyncWrite(mapAsyncArray, len): void

Parameters

NameType
mapAsyncArrayFloat32Array
lennumber

Returns

void

Inherited from

GPUBufferBase.mapAsyncWrite

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:413


destroy

destroy(force?): void

Parameters

NameType
force?boolean

Returns

void

Inherited from

GPUBufferBase.destroy

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:454


resizeBuffer

resizeBuffer(size, data?): void

Parameters

NameType
sizenumber
data?ArrayBufferData

Returns

void

Inherited from

GPUBufferBase.resizeBuffer

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:511


readBuffer

readBuffer(): Float32Array

Returns

Float32Array

Inherited from

GPUBufferBase.readBuffer

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:558

readBuffer(promise): Float32Array

Parameters

NameType
promisefalse

Returns

Float32Array

Inherited from

GPUBufferBase.readBuffer

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:559

readBuffer(promise): Promise<Float32Array>

Parameters

NameType
promisetrue

Returns

Promise<Float32Array>

Inherited from

GPUBufferBase.readBuffer

Defined in

src/gfx/graphics/webGpu/core/buffer/GPUBufferBase.ts:560


genUniformNodes

genUniformNodes(): void

Returns

void

Defined in

src/gfx/graphics/webGpu/core/buffer/UniformGPUBuffer.ts:16