Skip to content

Commit

Permalink
tweak example and ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Oct 24, 2024
1 parent 4493b49 commit 1a17427
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion examples/gui_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
from cube import setup_drawing_sync


canvas = WgpuCanvas(size=(640, 480), title="wgpu events", max_fps=10)
canvas = WgpuCanvas(
size=(640, 480),
title="wgpu events",
max_fps=10,
update_mode="continuous",
present_method="screen",
)
draw_frame = setup_drawing_sync(canvas)
canvas.request_draw(lambda: (draw_frame(), canvas.request_draw()))

Expand Down
2 changes: 1 addition & 1 deletion examples/wgpu-examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"source": [
"from cube import setup_drawing_sync\n",
"\n",
"canvas = WgpuCanvas(size=(640, 480), max_fps= 10, update_mode='continuous')\n",
"canvas = WgpuCanvas(size=(640, 480), max_fps=10, update_mode=\"continuous\")\n",
"\n",
"draw_frame = setup_drawing_sync(canvas)\n",
"canvas.request_draw(draw_frame)\n",
Expand Down
1 change: 0 additions & 1 deletion wgpu/gui/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ def _draw_frame_and_present(self):
self.__is_drawing = True

try:

# This method is called from the GUI layer. It can be called from a
# "draw event" that we requested, or as part of a forced draw.

Expand Down

0 comments on commit 1a17427

Please sign in to comment.