Coder Social home page Coder Social logo

pegl doesn't provide the OpenGL API about pegl HOT 2 CLOSED

perey avatar perey commented on September 26, 2024
pegl doesn't provide the OpenGL API

from pegl.

Comments (2)

perey avatar perey commented on September 26, 2024

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.

perey avatar perey commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.