TgpuBindGroupLayout
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:160
Extends
Section titled “Extends”TgpuNamable
Type Parameters
Section titled “Type Parameters”• Entries extends Record<string, TgpuLayoutEntry | null> = Record<string, TgpuLayoutEntry | null>
Properties
Section titled “Properties”[$internal]
Section titled “[$internal]”
readonly[$internal]:true
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:166
$
readonly$: { [K in string | number | symbol]: InferLayoutEntry<Entries[K]> }
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:178
readonlybound: { [K in string | number | symbol]: BindLayoutEntry<Entries[K]> }
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:169
entries
Section titled “entries”
readonlyentries:Entries
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:168
readonlyindex:undefined|number
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:187
An explicit numeric index assigned to this bind group layout. If undefined, a unique
index is assigned automatically during resolution. This can be changed with the
.$idx() method.
resourceType
Section titled “resourceType”
readonlyresourceType:"bind-group-layout"
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:167
readonlyvalue: { [K in string | number | symbol]: InferLayoutEntry<Entries[K]> }
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:175
Methods
Section titled “Methods”[$gpuValueOf]()
Section titled “[$gpuValueOf]()”[$gpuValueOf](): { [K in string | number | symbol]: InferLayoutEntry<Entries[K]> }
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:172
Returns
Section titled “Returns”{ [K in string | number | symbol]: InferLayoutEntry<Entries[K]> }
$idx()
Section titled “$idx()”$idx(
index?):this
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:195
Associates this bind group layout with an explicit numeric index. When a call to this method is omitted, a unique numeric index is assigned to it automatically.
Used when generating WGSL code: @group(${index}) @binding(...) ...;
Parameters
Section titled “Parameters”index?
Section titled “index?”number
Returns
Section titled “Returns”this
$name()
Section titled “$name()”$name(
label):this
Defined in: packages/typegpu/src/shared/meta.ts:83
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”TgpuNamable.$name
unwrap()
Section titled “unwrap()”unwrap(
unwrapper):GPUBindGroupLayout
Defined in: packages/typegpu/src/tgpuBindGroupLayout.ts:202
Creates a raw WebGPU resource based on the typed descriptor.
NOTE: This creates a new resource every time, better to use root.unwrap(...) instead.
Parameters
Section titled “Parameters”unwrapper
Section titled “unwrapper”Unwrapper
Used to unwrap any resources that this resource depends on.
Returns
Section titled “Returns”GPUBindGroupLayout