An in-progress recording of a render pass.
Methods
draw(verticesStart:Int, verticesEnd:Int, instancesStart:Int, instancesEnd:Int):Void
Draws primitives from the active vertex buffer(s).
The active vertex buffers can be set with RenderPass.setVertexBuffers
.
drawIndexed(indicesStart:Int, indicesEnd:Int, baseVertex:Int, instancesStart:Int, instancesEnd:Int):Void
Draws indexed primitives using the active index buffer and the active vertex buffers.
The active index buffer can be set with RenderPass.setIndexBuffer
, while the active vertex buffers can be set with RenderPass.setVertexBuffers
.
drawIndexedIndirect(indirectBuffer:Buffer, indirectOffset:Int):Void
Draws indexed primitives using the active index buffer and the active vertex buffers, based on the contents of the indirectBuffer
.
The active index buffer can be set with RenderPass.setIndexBuffer
, while the active vertex buffers can be set with RenderPass.setVertexBuffers
.
Throws:
UseAfterDestroyException | If |
---|
drawIndirect(indirectBuffer:Buffer, indirectOffset:Int):Void
Draws primitives from the active vertex buffer(s) based on the contents of the indirectBuffer
.
The active vertex buffers can be set with RenderPass.setVertexBuffers
.
Throws:
UseAfterDestroyException | If |
---|
setBindGroup(index:Int, bindGroup:BindGroup, offsets:Array<Int>):Void
Sets the active bind group for a given bind group index.
Throws:
UseAfterDestroyException | If |
---|
setIndexBuffer(buffer:Buffer, offset:Int, size:Int):Void
Sets the active index buffer.
Subsequent calls to drawIndexed
on this RenderPass
will use buffer
as the source index buffer.
If size
== 0, the remaining part of the buffer is considered.
Throws:
UseAfterDestroyException | If |
---|
setPipeline(renderPipeline:RenderPipeline):Void
Sets the active render pipeline.
Subsequent draw calls will exhibit the behavior defined by pipeline
.
setScissorRect(x:Int, y:Int, width:Int, height:Int):Void
Sets the scissor region.
Subsequent draw calls will discard any fragments that fall outside this region.
setStencilReference(reference:Int):Void
Sets the stencil reference.
Subsequent stencil tests will test against this value.
setVertexBuffer(slot:Int, buffer:Buffer, offset:Int, size:Int):Void
Assign a vertex buffer to a slot.
Subsequent calls to draw
and drawIndexed
on this RenderPass
will use buffer
as one of the source vertex buffers.
The slot
refers to the index of the matching descriptor in RenderPipelineDescriptor.vertex_buffers
.
If size
== 0, the remaining part of the buffer is considered.
Throws:
UseAfterDestroyException | If |
---|
setViewport(x:Float, y:Float, width:Float, height:Float, minDepth:Float, maxDepth:Float):Void
Sets the viewport region.
Subsequent draw calls will draw any fragments in this region.