Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider updating visualization #80

Open
einarf opened this issue Aug 28, 2018 · 11 comments
Open

Consider updating visualization #80

einarf opened this issue Aug 28, 2018 · 11 comments

Comments

@einarf
Copy link
Member

einarf commented Aug 28, 2018

Consider updating the visualization code to something more modern. Pyglet is pretty much locked to OpenGL 2.1 released in 2006. Today OpenGL 4.6 is the stable version. I would suggest using OpenGL 3.3 so we an at least visualize all different vertex formats. Most hardware today support his; even 5 year old onboard Intels.

I would suggest using ModernGL (https://github.com/cprogrammer1994/ModernGL) with PyQt5 as this also will align closer to users of this library (mainly coming from the Scientific Computing community).

@greenmoss
Copy link
Collaborator

Would upgrading to a newer OpenGL require us to deprecate Pyglet support?

@einarf
Copy link
Member Author

einarf commented Aug 30, 2018

Yep. It would mean replacing pyglet with something else. Pyglet doesn't support core profiles and are stuck on OpenGL 2.1 also using fixed pipeline. They are not planning to change this until pyglet version 2.x, that may never happen.

I have no idea if this causes any issues for anyone.

Replacement in packages would be

pip install PyQt5
pip install moderngl

.. instead of pyglet.

@greenmoss
Copy link
Collaborator

That's unfortunate. So Pyglet is basically holding us back then 😢

I am guessing supporting both Pyglet and ModernGL would be extremely complex. Is this correct?

@einarf
Copy link
Member Author

einarf commented Aug 30, 2018

I am guessing supporting both Pyglet and ModernGL would be extremely complex. Is this correct?

I don't think it's that hard to support both. Are there good reasons to keep the pyglet support?

@greenmoss
Copy link
Collaborator

The only downside I can think of switching is forcing existing Pyglet users to make changes. Is that likely?

@einarf
Copy link
Member Author

einarf commented Aug 30, 2018

We can just introduce a new module modern_visualization. In 3.0 we separated visualization into its own module visualization, so I guess this is pretty straight forward.

@greenmoss
Copy link
Collaborator

That sounds like a good solution to me.

@einarf
Copy link
Member Author

einarf commented Mar 6, 2019

The moderngl_window project is slowly shaping up. Will add new visualization module here when this is done. https://github.com/moderngl/moderngl_window

@einarf
Copy link
Member Author

einarf commented Jun 10, 2019

Pyglet 1.4 is ready soon that will solve a lot of the limitations in 1.3. We'll probably still stick with pyglet backend for moderngl_window. It does support using pyglet directly or moderngl. This way we can support both 😄

@einarf
Copy link
Member Author

einarf commented Jun 14, 2019

Note : Pyglet is moving from BitBucket to GitHub when 1.4 is released : https://github.com/pyglet/pyglet

@einarf
Copy link
Member Author

einarf commented Oct 21, 2019

We also have pyglet2 coming in the near future using the programmable pipeline. That adds more complications because it's not compatible with pyglet 1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants