WebGpuEncoder class final
One pass, recorded and submitted.
Constructors
- WebGpuEncoder(WebGpuDevice _device, RenderPassDescriptor descriptor)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bindIndexBuffer(
GeometryBuffer buffer, IndexType type, int indexCount) → void -
bindIndexData(
ByteData bytes, IndexType type, int indexCount) → void - Binds indices built this frame. See bindVertexData.
-
bindPipeline(
PipelineHandle pipeline) → void - Binds the pair of stages the following draws run.
-
bindTexture(
ShaderHandle shader, String slot, TextureHandle texture, {SamplerOptions? sampler}) → void -
Binds
textureto the sampler calledslotinshader. -
bindUniformBlock(
ShaderHandle shader, String blockName, Map< String, Float32List> members) → bool -
Fills the block called
blockNameand binds it. False whereshaderdeclares no such block. -
bindVertexBuffer(
GeometryBuffer buffer, int vertexCount, {int slot = 0}) → void - Binds geometry the device already holds — a mesh, or the one triangle every full-screen pass draws.
-
bindVertexData(
ByteData bytes, int vertexCount, {int slot = 0}) → void - Binds vertices built this frame.
-
clearBindings(
) → void - Forgets every binding, leaving rasteriser state alone.
-
draw(
{int instanceCount = 1}) → void - Draws what is bound. Always indexed — there is no non-indexed path in this engine, which is why the debug overlay keeps an identity index sequence.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setBlend(
BlendState? state, {int attachment = 0}) → void - Blending for one colour attachment; null switches it off.
-
setBlendColor(
Vector4 color) → void -
Refused, and the refusal is the promise
supportsBlendColormakes. -
setCullMode(
CullMode mode) → void -
setDepthCompare(
CompareFunction compare) → void -
setDepthWrite(
bool enabled) → void -
setPolygonMode(
PolygonMode mode) → void -
Refused for
PolygonMode.line. WebGPU has no polygon fill mode, so this is the answersupportsWireframebeing false already promised: a wireframe here means line primitives and an index buffer built for them, which is the renderer's decision and not a substitution a backend may make. -
setPrimitiveType(
PrimitiveType type) → void - How the following draws assemble their vertices.
-
setScissor(
ScreenRect rect) → void - Where fragments survive. Bounds a draw, and — unlike a clear — is honoured by one.
-
setStencil(
StencilState front, {StencilState? back}) → void - The stencil test for the draws that follow.
-
setStencilReference(
int value) → void -
The value the stencil test compares against and
StencilOperation.setToReferenceValuestores. Eight bits; zero until set. -
setViewport(
ScreenRect rect) → void - Straight through: WebGPU states a viewport from the top left in pixels, which is where this contract states every rectangle. It is the place the WebGL2 backend has to turn a rectangle over, and there is nothing to do here at all.
-
setWindingOrder(
WindingOrder order) → void -
signatureFor(
WebGpuPipeline pipeline) → WebGpuPipelineSignature - The signature this draw's state makes, which is what the cache is consulted with.
-
submit(
) → void - Ends the pass and hands it to the queue.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited