GPURenderPassEncoder extension type
The GPURenderPassEncoder
interface of the WebGPU API
encodes
commands related to controlling the vertex and fragment shader stages, as
issued by a GPURenderPipeline. It forms part of the overall encoding
activity of a GPUCommandEncoder.
A render pipeline renders graphics to GPUTexture attachments, typically
intended for display in a canvas
element, but it could also render to
textures used for other purposes that never appear onscreen. It has two main
stages:
-
A vertex stage, in which a vertex shader takes positioning data fed into the GPU and uses it to position a series of vertices in 3D space by applying specified effects like rotation, translation, or perspective. The vertices are then assembled into primitives such as triangles (the basic building block of rendered graphics) and rasterized by the GPU to figure out what pixels each one should cover on the drawing canvas.
-
A fragment stage, in which a fragment shader computes the color for each pixel covered by the primitives produced by the vertex shader. These computations frequently use inputs such as images (in the form of textures) that provide surface details and the position and color of virtual lights.
A GPURenderPassEncoder
object instance is created via the
GPUCommandEncoder.beginRenderPass property.
API documentation sourced from MDN Web Docs.
- on
- Implemented types
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDefinedAndNotNull → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
no setter - isNull → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
Whether this value corresponds to JavaScriptnull
.no setter - isTruthy → JSBoolean
-
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of!!
in JavaScript.this
no setter - isUndefined → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
Whether this value corresponds to JavaScriptundefined
.no setter - isUndefinedOrNull → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
no setter - label ↔ String
-
The
label
read-only property of the GPURenderPassEncoder interface is a string providing a label that can be used to identify the object, for example in GPUError messages or console warnings.getter/setter pair - not → JSBoolean
-
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of!
in JavaScript.this
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
+any
-
and(
JSAny? any) → JSAny? -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
&&any
-
beginOcclusionQuery(
GPUSize32 queryIndex) → void -
The
beginOcclusionQuery()
method of the GPURenderPassEncoder interface begins an occlusion query at the specified index of the relevant GPUQuerySet (provided as the value of theocclusionQuerySet
descriptor property when invoking GPUCommandEncoder.beginRenderPass to run the render pass). -
callMethod<
R extends JSAny?> (JSAny method, [JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) → R -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Callsmethod
on this JSObject with up to four arguments. -
callMethodVarArgs<
R extends JSAny?> (JSAny method, [List< JSAny?> ? arguments]) → R -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Callsmethod
on this JSObject with a variable number ofarguments
. -
dartify(
) → Object? -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Converts a JavaScript JSON-like value to the Dart equivalent if possible. -
delete(
JSAny property) → JSBoolean -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Deletes the property with keyproperty
from this JSObject. -
divide(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
/any
-
draw(
GPUSize32 vertexCount, [GPUSize32 instanceCount, GPUSize32 firstVertex, GPUSize32 firstInstance]) → void -
The
draw()
method of the GPURenderPassEncoder interface draws primitives based on the vertex buffers provided by GPURenderPassEncoder.setVertexBuffer. -
drawIndexed(
GPUSize32 indexCount, [GPUSize32 instanceCount, GPUSize32 firstIndex, GPUSignedOffset32 baseVertex, GPUSize32 firstInstance]) → void -
The
drawIndexed()
method of the GPURenderPassEncoder interface draws indexed primitives based on the vertex and index buffers provided by GPURenderPassEncoder.setVertexBuffer and GPURenderPassEncoder.setIndexBuffer. -
drawIndexedIndirect(
GPUBuffer indirectBuffer, GPUSize64 indirectOffset) → void -
The
drawIndexedIndirect()
method of the GPURenderPassEncoder interface draws indexed primitives using parameters read from a GPUBuffer. -
drawIndirect(
GPUBuffer indirectBuffer, GPUSize64 indirectOffset) → void -
The
drawIndirect()
method of the GPURenderPassEncoder interface draws primitives using parameters read from a GPUBuffer. -
end(
) → void -
The
end()
method of the GPURenderPassEncoder interface completes recording of the current render pass command sequence. -
endOcclusionQuery(
) → void -
The
endOcclusionQuery()
method of the GPURenderPassEncoder interface ends an active occlusion query previously started with GPURenderPassEncoder.beginOcclusionQuery. -
equals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
==any
-
executeBundles(
JSArray< GPURenderBundle> bundles) → void -
The
executeBundles()
method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass. -
exponentiate(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
**any
-
getProperty<
R extends JSAny?> (JSAny property) → R -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
The value of the property keyproperty
of this JSObject. -
greaterThan(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
>any
-
greaterThanOrEqualTo(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
>=any
-
has(
String property) → bool -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Shorthand helper for hasProperty to check whether this JSObject contains the property keyproperty
, but takes and returns a Dart value. -
hasProperty(
JSAny property) → JSBoolean -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Whether or not this JSObject contains the property keyproperty
. -
insertDebugMarker(
String markerLabel) → void -
The
insertDebugMarker()
method of the GPURenderPassEncoder interface marks a specific point in a series of encoded render pass commands with a label. -
instanceof(
JSFunction constructor) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?
is aninstanceof
constructor
. -
instanceOfString(
String constructorName) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?
is aninstanceof
the constructor that is defined byconstructorName
, which is looked up in the globalContext. -
isA<
T extends JSAny?> () → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?
is an instance of the JavaScript type that is declared byT
. -
lessThan(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
<any
-
lessThanOrEqualTo(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
<=any
-
modulo(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
%any
-
multiply(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
*any
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
!=any
-
or(
JSAny? any) → JSAny? -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
||any
-
popDebugGroup(
) → void -
The
popDebugGroup()
method of the GPURenderPassEncoder interface ends a render pass debug group, which is begun with a GPURenderPassEncoder.pushDebugGroup call. -
pushDebugGroup(
String groupLabel) → void -
The
pushDebugGroup()
method of the GPURenderPassEncoder interface begins a render pass debug group, which is marked with a specified label, and will contain all subsequent encoded commands up until a GPURenderPassEncoder.popDebugGroup method is invoked. -
setBindGroup(
GPUIndex32 index, GPUBindGroup? bindGroup, [JSObject dynamicOffsetsOrDynamicOffsetsData, GPUSize64 dynamicOffsetsDataStart, GPUSize32 dynamicOffsetsDataLength]) → void -
The
setBindGroup()
method of the GPURenderPassEncoder interface sets the GPUBindGroup to use for subsequent render commands, for a given index. -
setBlendConstant(
GPUColor color) → void -
The
setBlendConstant()
method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with"constant"
and"one-minus-constant"
blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline method, in theblend
property). -
setIndexBuffer(
GPUBuffer buffer, GPUIndexFormat indexFormat, [GPUSize64 offset, GPUSize64 size]) → void -
The
setIndexBuffer()
method of the GPURenderPassEncoder interface sets the current GPUBuffer that will provide index data for subsequent drawing commands. -
setPipeline(
GPURenderPipeline pipeline) → void -
The
setPipeline()
method of the GPURenderPassEncoder interface sets the GPURenderPipeline to use for subsequent render pass commands. -
setProperty(
JSAny property, JSAny? value) → void -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Write thevalue
of property keyproperty
of this JSObject. -
setScissorRect(
GPUIntegerCoordinate x, GPUIntegerCoordinate y, GPUIntegerCoordinate width, GPUIntegerCoordinate height) → void -
The
setScissorRect()
method of the GPURenderPassEncoder interface sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments that fall outside the scissor rectangle will be discarded. -
setStencilReference(
GPUStencilValue reference) → void -
The
setStencilReference()
method of the GPURenderPassEncoder interface sets the stencil reference value using during stencil tests with the"replace"
stencil operation (as set in the descriptor of the GPUDevice.createRenderPipeline method, in the properties defining the various stencil operations). -
setVertexBuffer(
GPUIndex32 slot, GPUBuffer? buffer, [GPUSize64 offset, GPUSize64 size]) → void -
The
setVertexBuffer()
method of the GPURenderPassEncoder interface sets or unsets the current GPUBuffer for the given slot that will provide vertex data for subsequent drawing commands. -
setViewport(
num x, num y, num width, num height, num minDepth, num maxDepth) → void -
The
setViewport()
method of the GPURenderPassEncoder interface sets the viewport used during the rasterization stage to linearly map from normalized device coordinates to viewport coordinates. -
strictEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
===any
-
strictNotEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
!==any
-
subtract(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
-any
-
toString(
) → String -
A string representation of this object.
inherited
-
typeofEquals(
String typeString) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether the result oftypeof
on thisJSAny?
istypeString
. -
unsignedRightShift(
JSAny? any) → JSNumber -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
>>>any
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String property) → JSAny? -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Shorthand helper for getProperty to get the value of the property keyproperty
of this JSObject, but takes a Dart value. -
operator []=(
String property, JSAny? value) → void -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Shorthand helper for setProperty to write thevalue
of the property keyproperty
of this JSObject, but takes a Dart value.