diff --git a/examples/imgui_backend_sea.py b/examples/imgui_backend_sea.py index 5b320c35..34c2ac39 100644 --- a/examples/imgui_backend_sea.py +++ b/examples/imgui_backend_sea.py @@ -402,8 +402,9 @@ def render(): render_pass.draw(3, 1) # draw imgui + psize = canvas.get_physical_size() imgui_data = gui(app_state) - imgui_backend.render(imgui_data, render_pass) + imgui_backend.render(imgui_data, render_pass, psize) render_pass.end() diff --git a/wgpu/utils/imgui/imgui_backend.py b/wgpu/utils/imgui/imgui_backend.py index f45dbac8..24508a8f 100644 --- a/wgpu/utils/imgui/imgui_backend.py +++ b/wgpu/utils/imgui/imgui_backend.py @@ -390,6 +390,8 @@ def render( The draw data to render, this is usually obtained by calling ``imgui.get_draw_data()`` render_pass : wgpu.GPURenderPassEncoder The render pass to render the imgui draw data with + psize : tuple(int, int) + The physical size of the canvas, get from calling ``canvas.get_physical_size()`` """ if draw_data is None: return