Comments (2)
Thanks for the report! No, Pegl doesn’t provide the OpenGL API.
In theory, it should be possible to use Pegl together with PyOpenGL, as you’re trying to do. In practice, it will not. You should instead see if PyOpenGL itself provides what you need. (It does seem like PyOpenGL’s own WGL module has support for pbuffers, which are off-screen rendering surfaces, so this may be a good sign for your headless server use case.)
A bit of background on EGL (and please understand I’m not an expert, just a hobbyist): OpenGL has been around a long time, and different platforms supplemented it with their own support libraries. X11 had GLX, Apple had CGL, Microsoft had WGL… there may have been others, but those are the three I know of. They provided (and still provide) things that weren’t part of OpenGL itself, like managing rendering surfaces (on-screen or off-screen).
Then along came OpenGL ES, a slimmed-down version of OpenGL designed for embedded systems first and foremost. EGL emerged at the same time, and was presumably intended to go with it: a standardised alternative to those other platform libraries, one that embedded platforms could provide.
OpenGL ES has been very successful, particularly thanks to the uptake of mobile computing, and quite a bit of software now targets it even on the desktop (e.g. Google Chrome). Presumably it’s easier to just write everything for one graphics API.
EGL has not been so successful. It is used alongside OpenGL ES on mobile platforms, and on desktop it’s a core part of the Wayland platform, but Khronos evidently wanted it to go further. The specification allows EGL to be used together with other APIs, namely regular OpenGL, and the (also sadly unsuccessful) OpenVG vector graphics API. But that doesn’t mean that any particular implementation of EGL will actually use those APIs.
Pegl is not an EGL implementation—it just lets Python access an implementation. When you get the DLLs from your Chrome installation, you’re getting Google’s EGL implementation, and they chose to only support OpenGL ES.
At some time in the future, I’d like to see whether it’s possible to get Pegl and PyOpenGL to work together. (It should be possible. They have their own EGL wrapper, so it ought to be possible to use another EGL wrapper instead.) But this will only work on platforms that have EGL and OpenGL implementations that are already made for working together.
from pegl.
ModernGL is a Python binding to OpenGL that says that it supports headless rendering, so I’d suggest you look at that for your needs. Sorry I couldn’t be more helpful!
Closing as out of scope for Pegl.
from pegl.
Related Issues (15)
- Native library import does not support linux3 HOT 4
- Work with current aenum version HOT 1
- Easier way to specify attributes
- Test on Python 3.10 HOT 1
- More robust EGL library loading on a range of platforms HOT 8
- Fix exception in surface and context destructors HOT 1
- Cant run minimal example HOT 6
- Pegl has no attribute display HOT 2
- a
- pegl version format HOT 5
- Set up automated testing
- Exception in Display destructor HOT 2
- Publish documentation
- Automate releases
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pegl.