GPURenderPassEncoder¶
- class wgpu.GPURenderPassEncoder¶
Bases:
GPUCommandsMixin
,GPUDebugCommandsMixin
,GPUBindingCommandsMixin
,GPURenderCommandsMixin
,GPUObjectBase
Object to records commands for a render pass.
Create a render pass encoder using GPUCommandEncoder.begin_render_pass.
- begin_occlusion_query(query_index)¶
TODO
- end()¶
Record the end of the render pass.
- end_occlusion_query()¶
TODO
- execute_bundles(bundles)¶
TODO: not yet available in wgpu-native
- set_blend_constant(color)¶
Set the blend color for the render pass.
- Parameters:
color (tuple or dict) – A color with fields (r, g, b, a).
- set_scissor_rect(x, y, width, height)¶
Set the scissor rectangle for this render pass. The scene is rendered as usual, but is only applied to this sub-rectangle.
- Parameters:
x (int) – Horizontal coordinate.
y (int) – Vertical coordinate.
width (int) – Horizontal size.
height (int) – Vertical size.
- set_stencil_reference(reference)¶
Set the reference stencil value for this render pass.
- Parameters:
reference (int) – The reference value.
- set_viewport(x, y, width, height, min_depth, max_depth)¶
Set the viewport for this render pass. The whole scene is rendered to this sub-rectangle.
- Parameters:
x (int) – Horizontal coordinate.
y (int) – Vertical coordinate.
width (int) – Horizontal size.
height (int) – Vertical size.
min_depth (int) – Clipping in depth.
max_depth (int) – Clipping in depth.