.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/cube_glfw.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_cube_glfw.py: Cube glfw --------- Run a wgpu example on the glfw backend (with the default asyncio loop). .. GENERATED FROM PYTHON SOURCE LINES 7-21 .. code-block:: Python from rendercanvas.glfw import RenderCanvas, loop from rendercanvas.utils.cube import setup_drawing_sync canvas = RenderCanvas( title="The wgpu cube example on $backend", update_mode="continuous" ) draw_frame = setup_drawing_sync(canvas) canvas.request_draw(draw_frame) if __name__ == "__main__": loop.run() .. _sphx_glr_download_gallery_cube_glfw.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: cube_glfw.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: cube_glfw.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: cube_glfw.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_