coin icon indicating copy to clipboard operation
coin copied to clipboard

Egl dust off2

Open benj5378 opened this issue 1 year ago • 18 comments

This PR is Closes https://github.com/coin3d/coin/issues/451 Issue by adding EGL support for the Coin library. Use COIN_BUILD_EGL option to force EGL build. Still WIP, do not merge. - @epuzanov

The purpose of this PR is to clean up #471, add https://github.com/coin3d/coin/commit/b49b8b4713c2503cb25fe8e149aba3eafd18af60, rebase, and trigger CI in a non-draft PR.

benj5378 avatar Oct 01 '24 09:10 benj5378

I have now tested this, and can confirm it makes FreeCAD run on Wayland.

As far as I can tell, this fixes... https://github.com/FreeCAD/FreeCAD/issues/6068 https://github.com/FreeCAD/FreeCAD/issues/6288 https://github.com/FreeCAD/FreeCAD/issues/9273 https://github.com/FreeCAD/FreeCAD/issues/13144 https://github.com/FreeCAD/FreeCAD/issues/16393

benj5378 avatar Oct 01 '24 12:10 benj5378

However, if one tries to create a rectangle in FreeCAD Sketcher, SIGSEGV happen.

Vertices and distance constraints work fine, but arcs, rectangles and lines causes a crash. @luzpaz, @katepavlu, @euphi or @ramast can you try to compile for this branch on Wayland(!) and see if you get the same issues?

Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d7621f0 (Annotation)

Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d7621f0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d762bd0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d763870 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d764550 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d739d90 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d7618f0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d763870 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d764550 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d739d90 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d7618f0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d7621f0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d762bd0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d739d90 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d7618f0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d7621f0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d762bd0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d763870 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d764550 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d7621f0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d7618f0 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d739d90 (Annotation)
Coin error in SoGroup::removeChild(): tried to remove non-existent child 0x561a5d8d06e0 (Annotation)
Coin warning in SoChildList::traverse(): Detected modification of scene graph layout during action traversal. This is considered to be hazardous and error prone, and we strongly advice you to change your code and/or reorganize your scene graph so that this is not necessary.
Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x45320) [0x7f5fa0245320]
#1  0x7f5f9f855067 in SoAction::traverse(SoNode*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x2b
#2  0x7f5f9faf625b in SoChildList::traverse(SoAction*, int, int) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x1bd
#3  0x7f5f9faf65ac in SoChildList::traverse(SoAction*, int) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x6c
#4  0x7f5f9fb6e24a in SoGroup::getBoundingBox(SoGetBoundingBoxAction*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x18a
#5  0x7f5f9fb93bfa in SoSeparator::getBoundingBox(SoGetBoundingBoxAction*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x666
#6  0x7f5f9fb7a702 in SoNode::getBoundingBoxS(SoAction*, SoNode*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x7e
#7  0x7f5f9f8550d3 in SoAction::traverse(SoNode*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x97
#8  0x7f5f9faf625b in SoChildList::traverse(SoAction*, int, int) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x1bd
#9  0x7f5f9faf65ac in SoChildList::traverse(SoAction*, int) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x6c
#10  0x7f5f9fb6e24a in SoGroup::getBoundingBox(SoGetBoundingBoxAction*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x18a
#11  0x7f5f9fb93bfa in SoSeparator::getBoundingBox(SoGetBoundingBoxAction*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x666
#12  0x7f5f9fb7a702 in SoNode::getBoundingBoxS(SoAction*, SoNode*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x7e
#13  0x7f5f9f8550d3 in SoAction::traverse(SoNode*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x97
#14  0x7f5f9f855b77 in SoAction::beginTraversal(SoNode*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x27
#15  0x7f5f9f863dfc in SoGetBoundingBoxAction::beginTraversal(SoNode*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x68
#16  0x7f5f9f853d7e in SoAction::apply(SoNode*) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x3f6
#17  0x7f5f9fc8920d in SoRenderManagerP::setClippingPlanes() from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x135
#18  0x7f5f9fc856a7 in SoRenderManager::renderScene(SoGLRenderAction*, SoNode*, unsigned int) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x14d
#19  0x7f5f9fc85468 in SoRenderManager::actuallyRender(SoGLRenderAction*, int, int, int) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x13c
#20  0x7f5f9fc857c7 in SoRenderManager::renderSingle(SoGLRenderAction*, int, int, int) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0xe1
#21  0x7f5f9fc85262 in SoRenderManager::render(SoGLRenderAction*, int, int, int) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0xfe
#22  0x7f5f9fc8514d in SoRenderManager::render(int, int) from /home/bensay/Development/coin-build/coin_egl_build/lib/libCoin.so.80+0x2cd
#23  0x7f5fa614e6b8 in SIM::Coin3D::Quarter::QuarterWidget::actualRedraw() from /home/bensay/Development/FreeCAD-build/lib/libFreeCADGui.so+0x58
#24  0x7f5fa61afebf in Gui::View3DInventorViewer::renderScene() from /home/bensay/Development/FreeCAD-build/lib/libFreeCADGui.so+0x2f3
#25  0x7f5fa61af67f in Gui::View3DInventorViewer::actualRedraw() from /home/bensay/Development/FreeCAD-build/lib/libFreeCADGui.so+0x3b
#26  0x7f5fa614e3c2 in SIM::Coin3D::Quarter::QuarterWidget::paintEvent(QPaintEvent*) from /home/bensay/Development/FreeCAD-build/lib/libFreeCADGui.so+0x2cc
#27  0x7f5fa6158038 in SIM::Coin3D::Quarter::SoQTQuarterAdaptor::paintEvent(QPaintEvent*) from /home/bensay/Development/FreeCAD-build/lib/libFreeCADGui.so+0x60
#28  0x7f5fa19b0df8 in QWidget::event(QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x278
#29  0x7f5fa1a62647 in QFrame::event(QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x27
#30  0x7f5fa614e611 in SIM::Coin3D::Quarter::QuarterWidget::viewportEvent(QEvent*) from /home/bensay/Development/FreeCAD-build/lib/libFreeCADGui.so+0x1cf
#31  0x7f5fa0cd7e82 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x92
#32  0x7f5fa196bd35 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x75
#33  0x7f5fa5c0a3c0 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/bensay/Development/FreeCAD-build/lib/libFreeCADGui.so+0x118
#34  0x7f5fa0cd8118 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x128
#35  0x7f5fa19a8aee in QWidgetPrivate::sendPaintEvent(QRegion const&) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x3e
#36  0x7f5fa19a94a9 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x969

benj5378 avatar Oct 01 '24 13:10 benj5378

I can't compile on my setup at this time. Maybe some of these folks can ? @looooo, @wwmayer, @wandererfan, @paddlestroke, @mwganson

luzpaz avatar Oct 01 '24 14:10 luzpaz

I tried latest 1.0 branch of freecad on kde neon (more or less ubuntu 22.04). I have to set env-variable COIN_GL_NO_CURRENT_CONTEXT_CHECK to avoid triggering of an assert but apart from that it seems to work, creating rectangles, lines, arcs does work.

rmu75 avatar Oct 01 '24 21:10 rmu75

@rmu75 just to clarify: it works using sketcher having compiled FreeCAD with this Coin branch? And you are sure you chose EGL build when compiling coin, using build flag?

benj5378 avatar Oct 02 '24 06:10 benj5378

I compiled against benj5378:eglDustOff2 branch. Pretty sure it is using native wayland as the font rendering and dpi scaling looks completely different vom my XWayland setup. And the log is spammed with "(qt.qpa.wayland) Wayland does not support QWindow::requestActivate()" messages which don't appear when using XWayland.

Rotation and panning is very smooth, but zooming is stuttering and causes spikes in CPU usage and immediate spin up of cpu cooler.

rmu75 avatar Oct 02 '24 06:10 rmu75

Sometimes a warning Coin warning in glxglue_isdirect(): Couldn't get current GLX context. is triggered

rmu75 avatar Oct 02 '24 06:10 rmu75

I will re-check if it is really using EGL and not some kind of software rendering.

Seems I was overly enthusiastic and didn't compile with COIN_BUILD_EGL enabled... will re-check.

rmu75 avatar Oct 02 '24 06:10 rmu75

So I rebuilt libcoin with COIN_BUILD_EGL enabled, ldd confirms that FreeCAD imports libEGL.so next to libOpenGL and libGLX, but nonetheless I suspect it is using software rendering.

rmu75 avatar Oct 02 '24 07:10 rmu75

So after rebuilding FreeCAD situation is more or less unchanged, it seems to work as usual when started with QT_QPA_PLATFORM=xcb. With QT_QPA_PLATFORM=wayland zooming is a bit sluggish and CPU usage seems to be higher but everything including sketcher seems to work.

How can I check if it is really using EGL?

rmu75 avatar Oct 02 '24 07:10 rmu75

@rmu75, if you used the COIN_BUILD_EGL, then it should be EGL I guess. But I have no idea how to check. Qt will spit out Wayland warning even if not using EGL build Coin, as far as I know? Weird that I get those Sketcher crashes, and you don't

benj5378 avatar Oct 02 '24 07:10 benj5378

So I rebuilt libcoin with COIN_BUILD_EGL enabled, ldd confirms that FreeCAD imports libEGL.so next to libOpenGL and libGLX, but nonetheless I suspect it is using software rendering.

Perhaps you can find a GPU monitoring tool that will show whether your process is software rendering or not?

veelo avatar Oct 02 '24 07:10 veelo

running with EGL_LOG_LEVEL=debug spews out a bunch of debug info like

libEGL debug: using driver i915 for 33

libEGL debug: using driver i915 for 33

libEGL debug: pci id for fd 33: 8086:591b, driver iris

libEGL debug: MESA-LOADER: dlopen(/usr/lib/x86_64-linux-gnu/dri/iris_dri.so)

libEGL debug: did not find extension DRI_Kopper version 1

libEGL debug: No DRI config supports native format XBGR2101010
libEGL debug: No DRI config supports native format ABGR2101010
libEGL debug: No DRI config supports native format ABGR8888
libEGL debug: No DRI config supports native format XBGR8888
(qt.qpa.wayland) Wayland does not support QWindow::requestActivate()
(qt.qpa.wayland) Wayland does not support QWindow::requestActivate()
libEGL debug: eglPrintConfigDebug: nothing to print
libEGL debug: ---------------
libEGL debug: Configurations:
libEGL debug: cho       bf lv colourbuffer dp st  ms           vis  cav  bi     renderable           supported
libEGL debug: sen    id sz  l  r  g  b  a  th cl ns b           id  eat  nd  gl es es2 es3 vg         surfaces
libEGL debug: ---------------
libEGL debug:     0x001 32  0 10 10 10  2   0  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x002 32  0 10 10 10  2  16  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x003 32  0 10 10 10  2  24  0  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x004 32  0 10 10 10  2  24  8  0 0 0x00000000--            y  y   y   y                win,
libEGL debug:     0x005 32  0 10 10 10  2   0  0  2 1 0x00000000--            y  y   y   y                win,
libEGL debug:     0x006 32  0 10 10 10  2   0  0  4 1 0x00000000--            y  y   y   y                win,

so at least EGL seems to be initialized.

Not sure how to proceed, out of time for today.

rmu75 avatar Oct 02 '24 08:10 rmu75

running with LIBGL_ALWAYS_SOFTWARE is a big difference (nothing is smooth any more) so I'm pretty sure that without that it is actually using the GPU.

rmu75 avatar Oct 02 '24 09:10 rmu75

I will re-check if it is really using EGL and not some kind of software rendering.

Seems I was overly enthusiastic and didn't compile with COIN_BUILD_EGL enabled... will re-check.

AFAIU without COIN_BUILD_EGL this doesn't link to libEGL. But even then EGL is loaded dynamically if needed (via egl glue code?).

rmu75 avatar Oct 02 '24 18:10 rmu75

I opened up a project for tracking Wayland and OpenGL ES support. It should be public now.

WizzerWorks avatar Oct 03 '24 15:10 WizzerWorks

I managed to compile libcoin and FreeCAD with cmake -DCOIN_BUILD_EGL=ON for libcoin. FreeCAD shows the splash screen but then crashes when the main window attempts to open:

FreeCAD: /home/gael/04-sources/freecad/FreeCAD/src/Mod/Sketcher/Gui/SoZoomTranslation.cpp:66: static void SketcherGui::SoZoomTranslation::initClass(): Assertion `!SoViewVolumeElement::getClassTypeId().isBad()' failed.

Before the crash I also get some warnings:

QOpenGLFunctions created with non-current context
(qt.qpa.wayland) Wayland does not support QWindow::requestActivate()

With EGL_LOG_LEVEL=debug ./bin/FreeCAD I get

libEGL debug: using driver i915 for 8

libEGL debug: using driver i915 for 8

libEGL debug: pci id for fd 8: 8086:a7a0, driver iris

libEGL debug: MESA-LOADER: dlopen(/usr/lib/x86_64-linux-gnu/dri/iris_dri.so)

libEGL debug: did not find extension DRI_Kopper version 1

libEGL debug: No DRI config supports native format XBGR2101010
libEGL debug: No DRI config supports native format ABGR2101010
libEGL debug: No DRI config supports native format ABGR8888
libEGL debug: No DRI config supports native format XBGR8888
libEGL debug: No DRI config supports native format XRGB1555
libEGL debug: No DRI config supports native format XRGB4444
...

It's strange that libEGL is using the i915 driver because I have a discrete NVIDIA card that it's supposed to use not the integrated GPU.

export COIN_GL_NO_CURRENT_CONTEXT_CHECK=1 before launching FreeCAD doesn't seem to have any influence.

Please note that the system packages libcoin-dev (4.0.0+ds-2) and libcoin80c (4.0.0+ds-2) are installed on my system.

FreeCAD 1.1.0 Revision: 38844 +2 (Git)

Library versions:
boost    1_74
Coin3D   4.0.3
Eigen3   3.4.0
OCC      7.8.1
Qt       5.15.3
Python   3.10.12
PySide   5.15.2
shiboken 5.15.2
SMESH    7.7.1.0
VTK      9.1.0
xerces-c 3.2.3

galou avatar Oct 04 '24 06:10 galou

I managed to compile libcoin and FreeCAD with cmake -DCOIN_BUILD_EGL=ON for libcoin. FreeCAD shows the splash screen but then crashes when the main window attempts to open:

FreeCAD: /home/gael/04-sources/freecad/FreeCAD/src/Mod/Sketcher/Gui/SoZoomTranslation.cpp:66: static void SketcherGui::SoZoomTranslation::initClass(): Assertion `!SoViewVolumeElement::getClassTypeId().isBad()' failed.

There is a very thorough investigation of the issue here (I think it's the same) https://github.com/FreeCAD/FreeCAD/issues/16316. I don't think it's Wayland related though. Can you please sudo apt remove pivy and then try again (I don't remember if recompile is needed)? @galou

benj5378 avatar Oct 07 '24 07:10 benj5378

bump

luzpaz avatar Nov 10 '24 11:11 luzpaz

Me and @hyarion have been considered what might be needed to maintain Coin for future use in FreeCAD. This includes EGL support and reaction to OpenGL currently being outphased in the industry.

Might be on hold until FreeCAD community have taken a decision on whether Coin should be used forward on.

I have no experience with Coin or EGL. I could read tons of docs on how to support EGL, but currently looking for people with experience in the area to help out. For example with seg faults arising, that I have no idea to why is happening (having zero Coin experience at all).

benj5378 avatar Nov 10 '24 12:11 benj5378

cc @chennes @yorikvanhavre

luzpaz avatar Nov 12 '24 21:11 luzpaz

At FreeCAD we currently have no plan to migrate out of coin. There have been several discussions among developers about it, and while coin is not actively being worked on, it's a fantastic library, many developers love it, it is simple to use, suits perfectly the needs of FreeCAD, and is extensible enough so it should provide the few things we feel are missing in FreeCAD (shadows, ambient occlusion, "filled" sections, etc)

Also, a big question if we thought of replacing it (which would be very extensive work), would be: replacing it with what, and there is no clear or easy answer to that question.

For me the conclusion to those discussions was that FreeCAD developers clearly want to stick with coin, and, if needed (basically: if maintenance or packaging become a problem, or if coin maintainers would want that), we would I think be ready to carry its maintenance ourselves.

yorikvanhavre avatar Nov 13 '24 08:11 yorikvanhavre

Just to give some insight the discussion between me and @benj5378 that benj referred to. The only real issue we identified with coin is that it seems to be quite tightly coupled with OpenGL (in compatible mode). I can't see into the future but it seems like the industry is moving away from OpenGL towards a more fragmented space with vulcan, dx and metal. OpenGL is already deprecated by on apple devices, though still available (https://developer.apple.com/documentation/apple-silicon/porting-your-macos-apps-to-apple-silicon)

In order to use coin on a future platform, where OpenGL is not available, it might be needed to look over the backend. Maybe switching over to vulcan or a low lever library like bgfx would be necessary.

Another issue to keep in mind is that freecad is using some features like line stipple more frequently, and these will soon require workaround as they are not well supported on various platforms (apples OpenGL driver causes quite ugly stipples when they are used with a line width. Some older mesa libraries are failing completely). If there would be a plan to swap OpenGL to something else, then it would be better for freecad if that is done before more features which ties it closer to OpenGL is implemented.

I agree that both coin has served us well and that there's currently no need to use anything else in freecad. Changing from coin to another engine does not look like a good option, but improving coin if needed, does. If there is interest to work on this, I'd be happy to help in one way or another.

hyarion avatar Nov 13 '24 16:11 hyarion

I looked at MGL on Apple M3 laptop to see if that technology could be used as a wrapper on metal for bringing Coin OpenGL to the new Apple machines. The MGL open source is very poorly supported and I was unable to bring up the test suite on it. So I'm not recommending that approach without an investment in fixing it/MGL.

It would be interesting to see if the low-level, OpenGL-based rendering interface for Coin could be made abstract and generic enough to support different 3D rendering pipelines. It may be a pipe dream, though, and take a considerable amount of work with lots of limitations for each platform.

WizzerWorks avatar Nov 13 '24 18:11 WizzerWorks

In order to use coin on a future platform, where OpenGL is not available, it might be needed to look over the backend. Maybe switching over to vulcan or a low lever library like bgfx would be necessary.

Great to see this discussion. I have been working ocasionally on this task, started from the EGL PR and been trying to convert Coin3D to work with modern OpenGL. Incidentally I started with a separate branch for a bgfx-based renderer, like you suggested, but eventually switched back to just porting the existing renderer to modern OpenGL, with the eventual to get FreeCAD to run on the web with WebGL.

I haven't worked on it in a bit, but I think I had some basic geometry rendering with shaders on the web with Emscripten-based setup, as well as compatibility profile feature gating. Would be glad to clean it up and share it if someone would like check it out and/or help move things along.

tritao avatar Nov 14 '24 01:11 tritao

@yorikvanhavre

..., it's a fantastic library, many developers love it, it is simple to use, suits perfectly the needs of FreeCAD, and is extensible enough so it should provide the few things we feel are missing in FreeCAD (shadows, ambient occlusion, "filled" sections, etc)

Exactly that was the motivation a few years ago when I started to move Coin over to Github and spent a large amount of time to get the build process running with GitHub Actions. To me Coin seemed to good to let it die. I have used it a very long time in a physics simulation software for visualisation.

Also, a big question if we thought of replacing it (which would be very extensive work), would be: replacing it with what, and there is no clear or easy answer to that question.

I coudn't answer that either and spent some time with Qt3D, but Coin feels to me more like batteries included. It's easy to quickly get something up and running.

For me the conclusion to those discussions was that FreeCAD developers clearly want to stick with coin, and, if needed (basically: if maintenance or packaging become a problem, or if coin maintainers would want that), we would I think be ready to carry its maintenance ourselves.

As for now packaging is not a problem. Releasing is simply adding first time contributors to the THANKS file, adding ChangeLog file, bumping the version number and tagging the release. Everything else runs fully automated on Github and AppVeyor. And, most linux distributions and vcpkg include a ready to install package for Coin, simage, SoQt and Quarter. As FreeCAD is one of the largest software packages using Coin, please drop a issue or a note when a new minor or major release is planned and some fixes need to be released.

VolkerEnderlein avatar Nov 14 '24 20:11 VolkerEnderlein

In order to use coin on a future platform, where OpenGL is not available, it might be needed to look over the backend. Maybe switching over to vulcan or a low lever library like bgfx would be necessary.

AFAIK Coin3d/FreeCAD only requires OpenGL 2.0, which should be well covered by ANGLE:

https://github.com/google/angle

eszlari avatar Nov 15 '24 22:11 eszlari

In order to use coin on a future platform, where OpenGL is not available, it might be needed to look over the backend. Maybe switching over to vulcan or a low lever library like bgfx would be necessary.

AFAIK Coin3d/FreeCAD only requires OpenGL 2.0, which should be well covered by ANGLE:

https://github.com/google/angle

ANGLE only implements OpenGL ES, which does not cover the immediate mode subset of OpenGL that Coin3D uses.

tritao avatar Nov 15 '24 22:11 tritao

the discussion that is going seems like it's better have in the issue rather than on a pull request, it is not clear to me what is the status of this PR, are there remaining problems with it?

adrianinsaval avatar Nov 18 '24 21:11 adrianinsaval

I compiled your branch (following the orignal Coin's INSTALL.MD) and used it against Freecad but the issue still occurs, I might be doing something wrong:

$ LD_PRELOAD=/usr/local/lib/libCoin.so.80 freecad
FreeCAD 1.0.0, Libs: 1.0.0R39109 (Git)
(C) 2001-2024 FreeCAD contributors
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.

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 glxglue_isdirect(): Couldn't get current GLX context.
Coin warning in SoGLPolygonOffsetElement::updategl(): OpenGL driver doesn't support z-buffer offset

Very laggy and completely white 3d view.

Specs:

nvidia-dkms 565.77-1
KDE Wayland

Could you please write a small list of steps of make your coin branch work for freecad?

aaravrav avatar Dec 21 '24 07:12 aaravrav