Documentation / device / GPUProgram
Interface: GPUProgram<T>
Defined in: libs/device/src/gpuobject.ts:1539
Abstract interface for GPU program
Extends
GPUObject<T>
Type Parameters
T
T = unknown
Properties
[EventMapType]?
readonlyoptional[EventMapType]?:object
Defined in: libs/base/dist/index.d.ts:585
Type-only event map marker.
dispose
dispose: []
Inherited from
device
readonlydevice:AbstractDevice
Defined in: libs/device/src/gpuobject.ts:1271
The object was created by which device
Inherited from
object
readonlyobject:T
Defined in: libs/device/src/gpuobject.ts:1273
The internal GPU object
Inherited from
uid
readonlyuid:number
Defined in: libs/device/src/gpuobject.ts:1275
unique id
Inherited from
cid
readonlycid:number
Defined in: libs/device/src/gpuobject.ts:1276
Inherited from
disposed
readonlydisposed:boolean
Defined in: libs/device/src/gpuobject.ts:1277
Inherited from
name
name:
string
Defined in: libs/device/src/gpuobject.ts:1278
Inherited from
restoreHandler
restoreHandler: (
tex) =>void
Defined in: libs/device/src/gpuobject.ts:1279
Parameters
tex
Returns
void
Inherited from
bindGroupLayouts
readonlybindGroupLayouts: readonlyReadonly<{label?:string;nameMap?:Record<string,string>;entries: readonlyReadonly<{binding:number;name:string;visibility:number;type:PBTypeInfo;buffer?:BufferBindingLayout;sampler?:SamplerBindingLayout;texture?:TextureBindingLayout;storageTexture?:StorageTextureBindingLayout;externalTexture?:ExternalTextureBindingLayout; }>[]; }>[]
Defined in: libs/device/src/gpuobject.ts:1540
type
readonlytype:"render"|"compute"
Defined in: libs/device/src/gpuobject.ts:1541
Methods
on()
on<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:592
Sets up a function that will be called whenever the specified event is delivered to the target
Type Parameters
K
K extends "dispose"
Parameters
type
K
The event type to listen for
listener
EventListener<{ dispose: []; }, K>
The callback function
context?
unknown
Context object of the listener function
Returns
void
Inherited from
once()
once<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:599
Sets up a function that will be called only once when the specified event is delivered to the target
Type Parameters
K
K extends "dispose"
Parameters
type
K
The event type to listen for
listener
EventListener<{ dispose: []; }, K>
The callback function
context?
unknown
Context object of the listener function
Returns
void
Inherited from
off()
off<
K>(type,listener?,context?):void
Defined in: libs/base/dist/index.d.ts:605
Removes an event listener function previously registered.
Type Parameters
K
K extends "dispose"
Parameters
type
K
The event type for which to remove an event listener
listener?
EventListener<{ dispose: []; }>
The callback function to be removed
context?
unknown
Returns
void
Inherited from
dispatchEvent()
dispatchEvent<
K>(type, ...args):void
Defined in: libs/base/dist/index.d.ts:611
Synchronously invoke the affected event listeners with an event object
Type Parameters
K
K extends "dispose"
Parameters
type
K
args
...object[K]
Returns
void
false if the event was canceled, otherwise true
Inherited from
isVertexLayout()
isVertexLayout():
this is VertexLayout<unknown>
Defined in: libs/device/src/gpuobject.ts:1280
Returns
this is VertexLayout<unknown>
Inherited from
isFramebuffer()
isFramebuffer():
this is FrameBuffer<unknown>
Defined in: libs/device/src/gpuobject.ts:1281
Returns
this is FrameBuffer<unknown>
Inherited from
isSampler()
isSampler():
this is TextureSampler<unknown>
Defined in: libs/device/src/gpuobject.ts:1282
Returns
this is TextureSampler<unknown>
Inherited from
isTexture()
isTexture():
this is BaseTexture<unknown>
Defined in: libs/device/src/gpuobject.ts:1283
Returns
this is BaseTexture<unknown>
Inherited from
isTexture2D()
isTexture2D():
this is Texture2D<unknown>
Defined in: libs/device/src/gpuobject.ts:1284
Returns
this is Texture2D<unknown>
Inherited from
isTexture2DArray()
isTexture2DArray():
this is Texture2DArray<unknown>
Defined in: libs/device/src/gpuobject.ts:1285
Returns
this is Texture2DArray<unknown>
Inherited from
isTexture3D()
isTexture3D():
this is Texture3D<unknown>
Defined in: libs/device/src/gpuobject.ts:1286
Returns
this is Texture3D<unknown>
Inherited from
isTextureCube()
isTextureCube():
this is TextureCube<unknown>
Defined in: libs/device/src/gpuobject.ts:1287
Returns
this is TextureCube<unknown>
Inherited from
isTextureVideo()
isTextureVideo():
this is TextureVideo<unknown>
Defined in: libs/device/src/gpuobject.ts:1288
Returns
this is TextureVideo<unknown>
Inherited from
isProgram()
isProgram():
this is GPUProgram<unknown>
Defined in: libs/device/src/gpuobject.ts:1289
Returns
this is GPUProgram<unknown>
Inherited from
isBuffer()
isBuffer():
this is GPUDataBuffer<unknown>
Defined in: libs/device/src/gpuobject.ts:1290
Returns
this is GPUDataBuffer<unknown>
Inherited from
isBindGroup()
isBindGroup():
this is BindGroup
Defined in: libs/device/src/gpuobject.ts:1291
Returns
this is BindGroup
Inherited from
dispose()
dispose():
void
Defined in: libs/device/src/gpuobject.ts:1292
Returns
void
Inherited from
reload()
reload():
void
Defined in: libs/device/src/gpuobject.ts:1293
Returns
void
Inherited from
destroy()
destroy():
void
Defined in: libs/device/src/gpuobject.ts:1294
Returns
void
Inherited from
restore()
restore():
void
Defined in: libs/device/src/gpuobject.ts:1295
Returns
void
Inherited from
getShaderSource()
getShaderSource(
kind):string
Defined in: libs/device/src/gpuobject.ts:1542
Parameters
kind
Returns
string
getCompileError()
getCompileError():
string
Defined in: libs/device/src/gpuobject.ts:1543
Returns
string
getBindingInfo()
getBindingInfo(
name):BindPointInfo
Defined in: libs/device/src/gpuobject.ts:1544
Parameters
name
string
Returns
createUniformBuffer()
createUniformBuffer(
uniform):StructuredBuffer<unknown>
Defined in: libs/device/src/gpuobject.ts:1545
Parameters
uniform
string
Returns
StructuredBuffer<unknown>
use()
use():
void
Defined in: libs/device/src/gpuobject.ts:1546
Returns
void