GPUBindGroupEntry


public final class GPUBindGroupEntry


Describes a single resource binding within a bind group.

Summary

Nested types

public final class GPUBindGroupEntry.Builder

Builder for GPUBindGroupEntry.

Public constructors

GPUBindGroupEntry(
    int binding,
    GPUBuffer buffer,
    long offset,
    long size,
    GPUSampler sampler,
    GPUTextureView textureView
)

Public methods

final int

The binding index corresponding to a shader resource.

final GPUBuffer

The buffer to bind.

final long

The offset in bytes from the beginning of the buffer.

final GPUSampler

The sampler to bind.

final long

The size in bytes of the buffer binding.

final GPUTextureView
final void
setBinding(int binding)

The binding index corresponding to a shader resource.

final void

The buffer to bind.

final void
setOffset(long offset)

The offset in bytes from the beginning of the buffer.

final void

The sampler to bind.

final void
setSize(long size)

The size in bytes of the buffer binding.

final void

Public constructors

GPUBindGroupEntry

Added in 1.0.0-alpha04
public GPUBindGroupEntry(
    int binding,
    GPUBuffer buffer,
    long offset,
    long size,
    GPUSampler sampler,
    GPUTextureView textureView
)

Public methods

getBinding

Added in 1.0.0-alpha04
public final int getBinding()

The binding index corresponding to a shader resource.

getBuffer

Added in 1.0.0-alpha04
public final GPUBuffer getBuffer()

The buffer to bind. Must be {@code null} if sampler or textureView is set.

getOffset

Added in 1.0.0-alpha04
public final long getOffset()

The offset in bytes from the beginning of the buffer.

getSampler

Added in 1.0.0-alpha04
public final GPUSampler getSampler()

The sampler to bind. Must be {@code null} if buffer or textureView is set.

getSize

Added in 1.0.0-alpha04
public final long getSize()

The size in bytes of the buffer binding.

getTextureView

Added in 1.0.0-alpha04
public final GPUTextureView getTextureView()

setBinding

Added in 1.0.0-alpha04
public final void setBinding(int binding)

The binding index corresponding to a shader resource.

setBuffer

Added in 1.0.0-alpha04
public final void setBuffer(GPUBuffer buffer)

The buffer to bind. Must be {@code null} if sampler or textureView is set.

setOffset

Added in 1.0.0-alpha04
public final void setOffset(long offset)

The offset in bytes from the beginning of the buffer.

setSampler

Added in 1.0.0-alpha04
public final void setSampler(GPUSampler sampler)

The sampler to bind. Must be {@code null} if buffer or textureView is set.

setSize

Added in 1.0.0-alpha04
public final void setSize(long size)

The size in bytes of the buffer binding.

setTextureView

Added in 1.0.0-alpha04
public final void setTextureView(GPUTextureView textureView)