diff --git a/wgpu/gui/auto.py b/wgpu/gui/auto.py index a53db5a7..dfb107fd 100644 --- a/wgpu/gui/auto.py +++ b/wgpu/gui/auto.py @@ -5,7 +5,7 @@ for e.g. wx later. Or we might decide to stick with these three. """ -__all__ = ["WgpuCanvas", "loop"] +__all__ = ["WgpuCanvas", "loop", "run"] import os import sys @@ -189,3 +189,4 @@ def backends_by_trying_in_order(): # Load! module = select_backend() WgpuCanvas, loop = module.WgpuCanvas, module.loop +run = loop.run # backwards compat diff --git a/wgpu/gui/glfw.py b/wgpu/gui/glfw.py index 9e5dc999..6774fc4e 100644 --- a/wgpu/gui/glfw.py +++ b/wgpu/gui/glfw.py @@ -548,6 +548,7 @@ def _run(self): loop = GlfwAsyncioWgpuLoop() +run = loop.run # backwards compat def poll_glfw_briefly(poll_time=0.1): diff --git a/wgpu/gui/qt.py b/wgpu/gui/qt.py index ec225de2..ebf69642 100644 --- a/wgpu/gui/qt.py +++ b/wgpu/gui/qt.py @@ -599,3 +599,4 @@ def _wgpu_gui_poll(self): loop = QtWgpuLoop() +run = loop.run # backwards compat diff --git a/wgpu/gui/wx.py b/wgpu/gui/wx.py index 5a7788b2..0e35c142 100644 --- a/wgpu/gui/wx.py +++ b/wgpu/gui/wx.py @@ -568,3 +568,4 @@ def process_wx_events(self): loop = WxWgpuLoop() +run = loop.run # backwards compat