
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "gallery/gloo/start.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_gallery_gloo_start.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_gallery_gloo_start.py:


Simplest Possible Script
========================

.. GENERATED FROM PYTHON SOURCE LINES 8-25



.. image-sg:: /gallery/gloo/images/sphx_glr_start_001.png
   :alt: start
   :srcset: /gallery/gloo/images/sphx_glr_start_001.png
   :class: sphx-glr-single-img





.. code-block:: Python

    import sys

    from vispy import app, gloo

    canvas = app.Canvas(keys='interactive')


    @canvas.connect
    def on_draw(event):
        gloo.set_clear_color((0.2, 0.4, 0.6, 1.0))
        gloo.clear()


    canvas.show()

    if __name__ == '__main__' and sys.flags.interactive == 0:
        app.run()


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 0.423 seconds)


.. _sphx_glr_download_gallery_gloo_start.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: start.ipynb <start.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: start.py <start.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: start.zip <start.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
