Yap5 Repo Release

Hi all, this is to announce that I have made the yap5 repository public.

Its an experimental rewrite of p5py/p5 that instead uses pyglet as its graphics backend. Read the README in the repo for more details.

Slight disclaimer that I’ve only tested this on windows 10 with python 3.7 so if any bugs come up please please raise an issue.

this has stemmed from this topic.

1 Like

Hi @fenjalien, this looks great. Could you post a sample code so its easier for others to setup and run?

Before vispy (our current renderer), we did some early experiments with pygelt, pyopengl, etc. But we were facing issues for certain platforms. If you want to know more about it, you can contact Abhik Pal.

Also, for p5py, we are planning to add new renderers in the future. The current plan is to add Skia or Cairo as they are optimised in C++ and give huge performance improvements.

1 Like

Just van Rossum is working on a new drawbot based on Skia… https://github.com/justvanrossum/drawbot-skia

1 Like

I summarized my reasons for switching to Vispy in my GSoC 2018 proposal. Here is the relevant excerpt:

p5 relies on pyglet for most of rendering and handling window events. However, Pyglet lacks support for directly working with modern OpenGL […]. [T]his also introduced strange errors that are responsible for most of the cross-platform issues. One goal of this project will be to remove the dependence on pyglet completely (and hence, make the code cleaner) and instead move the backend to VisPy. This has the following advantages:

  • VisPy is able to work with multiple windowing frameworks (PyQT, PySide, GLFW, etc). This will allow us to make the main windowing code framework independent and will allow us to specify the framework based on the system we are on. Thus giving us better cross-platform support.

  • VisPy works with modern OpenGL and p5 was already using some code from the VisPy project to workaround the lack of good OpenGL support in pyglet.

  • VisPy is designed to work with NumPy and many of p5’s internal primitives already use NumPy arrays.

  • VisPy will make it possible to extend p5 in new ways — for instance, with Jupyter Notebooks.

2 Likes