coin
coin copied to clipboard
Missing GLES support
Strategically, this is a step towards supporting WebAssembly via Emscripten and creating 3D viewers in modern browsers.
PS: If I'm wrong about something, then correct me.
No, you are definitely right. Besides implementing the EGL support for Wayland this is another important issue that needs to be done to keep Coin alive and kicking :)
We have a showstopper here.
I have experience to port OpenGL ES 3.0 Programming Guide Sample Code
to Emscripten
. It uses both EGL
and GLES
API. But I don't have enough free time and knowledge of Coin
architecture to apply this experience.
Unfortunately my OpenGL knowledge is very basic. I've had a look into the Coin wgl stuff but could not derive a proper schedule what needs to be done to implement egl bindings. That's why I marked this as help wanted
. Sorry.
Anyone know of someone that could tackle this? If not, how to we proceed?
CC @wmayer @yorikvanhavre @realthunder @kkremitzki
@epuzanov has been kindly working on this and provided PR #470 for this. I have tested this and just merged with master.
I built FreeCAD (as a flatpak) with coin3d from master
(commit 28ac68d3de1970b32fd9524ad1ba6d0a502b78f2), passing -DCOIN_BUILD_EGL=YES
. On x86_64, no problem.
But on aarch64 (it's built with a Qt5 that only has GLES, and it's running on a RaspberryPi 4 64-bits), when I open a model I get this errors:
Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
Coin warning in SoGLPolygonOffsetElement::updategl(): OpenGL driver doesn't support z-buffer offsetting
And then the display looks like this:
The GLES is not an EGL. The Coin3d library used an OpenGL API, some part of it must be rewritten to be compatible with OpenGL ES API. The EGL support is needed for compatibility with Wayland, because Wayland doesn't support GLX API. Summary: GLX (X11) -> EGL (Wayland) OpenGL -> OpenGL ES (GLES)
Which I is I thought I had understood, but https://github.com/coin3d/coin/issues/449#issuecomment-1007506992 threw me off thinking it would work.
At least it no longer crashes, but that could be a different reason.
(yes the RaspberryPi still doesn't use Wayland/Weston)
@hfiguiere So it seems to be my misunderstanding. I thought it to be somewhat related to the EGL work. Sorry for the noise.
Any progress on this?