GPURenderPassEncoder
public final class GPURenderPassEncoder implements AutoCloseable
An object used to record commands for a render pass.
Summary
Public methods |
|
|---|---|
final external void |
@FastNativeBegins an occlusion query. |
external void |
close()Decrements the reference count of the object and frees resources when the count reaches zero. |
final external void |
@FastNativeDraws non-indexed primitives. |
final external void |
@FastNativeDraws indexed primitives. |
final external void |
@FastNativeDraws indexed primitives with parameters from a buffer. |
final external void |
@FastNativeDraws non-indexed primitives with parameters from a buffer. |
final external void |
Ends the render pass. |
final external void |
Ends an occlusion query. |
boolean |
|
final external void |
@FastNativeExecutes a list of render bundles. |
final long |
|
int |
hashCode() |
final external void |
@FastNativeInserts a debug marker into the command stream. |
final external void |
Pops the current debug group. |
final external void |
@FastNativePushes a new debug group. |
final external void |
@FastNativeSets a bind group for the pipeline. |
final external void |
@FastNativeSets the blend constant color. |
final external void |
@FastNativeSets the index buffer. |
final external void |
@FastNativeSets a human-readable label for debugging. |
final external void |
@FastNativeSets the current render pipeline. |
final external void |
@FastNativeSets the scissor rectangle. |
final external void |
@FastNativeSets the stencil reference value. |
final external void |
@FastNativeSets a vertex buffer for a specific slot. |
final external void |
@FastNativeSets the viewport rectangle. |
Public methods
beginOcclusionQuery
@FastNative
public final external void beginOcclusionQuery(int queryIndex)
Begins an occlusion query.
| Parameters | |
|---|---|
int queryIndex |
The index of the query in the query set. |
close
public external void close()
Decrements the reference count of the object and frees resources when the count reaches zero.
This is the standard way to manage object lifetimes and should be used in use blocks. After calling this, the object is no longer usable.
draw
@FastNative
public final external void draw(
int vertexCount,
int instanceCount,
int firstVertex,
int firstInstance
)
Draws non-indexed primitives.
| Parameters | |
|---|---|
int vertexCount |
The number of vertices to draw. |
int instanceCount |
The number of instances to draw. |
int firstVertex |
The index of the first vertex to draw. |
int firstInstance |
The index of the first instance to draw. |
drawIndexed
@FastNative
public final external void drawIndexed(
int indexCount,
int instanceCount,
int firstIndex,
int baseVertex,
int firstInstance
)
Draws indexed primitives.
| Parameters | |
|---|---|
int indexCount |
The number of indices to draw. |
int instanceCount |
The number of instances to draw. |
int firstIndex |
The index of the first index to draw. |
int baseVertex |
A value added to each index before reading from the vertex buffer. |
int firstInstance |
The index of the first instance to draw. |
drawIndexedIndirect
@FastNative
public final external void drawIndexedIndirect(
@NonNull GPUBuffer indirectBuffer,
long indirectOffset
)
Draws indexed primitives with parameters from a buffer.
drawIndirect
@FastNative
public final external void drawIndirect(@NonNull GPUBuffer indirectBuffer, long indirectOffset)
Draws non-indexed primitives with parameters from a buffer.
endOcclusionQuery
@FastNative
public final external void endOcclusionQuery()
Ends an occlusion query.
executeBundles
@FastNative
public final external void executeBundles(@NonNull GPURenderBundle[] bundles)
Executes a list of render bundles.
| Parameters | |
|---|---|
@NonNull GPURenderBundle[] bundles |
An array of render bundles to execute. |
insertDebugMarker
@FastNative
public final external void insertDebugMarker(@NonNull String markerLabel)
Inserts a debug marker into the command stream.
popDebugGroup
@FastNative
public final external void popDebugGroup()
Pops the current debug group.
pushDebugGroup
@FastNative
public final external void pushDebugGroup(@NonNull String groupLabel)
Pushes a new debug group.
setBindGroup
@FastNative
public final external void setBindGroup(
int groupIndex,
GPUBindGroup group,
@NonNull int[] dynamicOffsets
)
Sets a bind group for the pipeline.
| Parameters | |
|---|---|
int groupIndex |
The index of the bind group. |
GPUBindGroup group |
The bind group to set. |
@NonNull int[] dynamicOffsets |
An array of dynamic offsets. |
setBlendConstant
@FastNative
public final external void setBlendConstant(@NonNull GPUColor color)
Sets the blend constant color.
setIndexBuffer
@FastNative
public final external void setIndexBuffer(
@NonNull GPUBuffer buffer,
int format,
long offset,
long size
)
Sets the index buffer.
setLabel
@FastNative
public final external void setLabel(@NonNull String label)
Sets a human-readable label for debugging.
setPipeline
@FastNative
public final external void setPipeline(@NonNull GPURenderPipeline pipeline)
Sets the current render pipeline.
| Parameters | |
|---|---|
@NonNull GPURenderPipeline pipeline |
The render pipeline to set. |
setScissorRect
@FastNative
public final external void setScissorRect(int x, int y, int width, int height)
Sets the scissor rectangle.
| Parameters | |
|---|---|
int x |
The x-coordinate of the scissor rectangle. |
int y |
The y-coordinate of the scissor rectangle. |
int width |
The width of the scissor rectangle. |
int height |
The height of the scissor rectangle. |
setStencilReference
@FastNative
public final external void setStencilReference(int reference)
Sets the stencil reference value.
| Parameters | |
|---|---|
int reference |
The stencil reference value. |
setVertexBuffer
@FastNative
public final external void setVertexBuffer(int slot, GPUBuffer buffer, long offset, long size)
Sets a vertex buffer for a specific slot.
| Parameters | |
|---|---|
int slot |
The vertex buffer slot. |
GPUBuffer buffer |
The vertex buffer. |
long offset |
The offset in the vertex buffer. |
long size |
The size of the vertex data to use. |
setViewport
@FastNative
public final external void setViewport(
float x,
float y,
float width,
float height,
float minDepth,
float maxDepth
)
Sets the viewport rectangle.
| Parameters | |
|---|---|
float x |
The x-coordinate of the viewport. |
float y |
The y-coordinate of the viewport. |
float width |
The width of the viewport. |
float height |
The height of the viewport. |
float minDepth |
The minimum depth of the viewport. |
float maxDepth |
The maximum depth of the viewport. |