gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.48k stars 774 forks source link

GL3 core profile Segmentation FAULT #2425

Closed JudyDve closed 6 months ago

JudyDve commented 8 months ago

I get a segfault when running _osgearthviewer simple.earth in GL3 core profile, but runs fine in GL compatibility PROFILE. I switch the mp Egine as default. The debugging shows that the error location is in glDrawElements. I will continue to troubleshoot this issue.

Screenshot from 2024-01-18 16-12-51

OS: Ubuntu22.04 Graphics: llvmpipe (LLVM 15.0.6, 256 bits) / Mesa Intel® Graphics (ADL GT2) OSG: 3.6.5 OSGEARTH: 2.10.2

gwaldron commented 8 months ago

osgEarth 2.10 is many years old; I really recommend you move up to a modern version if possible. GL3 and GLCORE support are much better in the latest versions. You may also want to read this since you are using Mesa. Good luck!

JudyDve commented 8 months ago

Thank you for your suggestion. Later on, I will also deeply use the higher version content. I understand that the version(2.10) is no longer maintained, but I think I may have found the issue above(segfault). It seems to be related to the OE‘s shaders . If I set resetVertexAttribute(false), the display is normal, But I haven't been able to pinpoint which shader it is yet causing the issue.

gwaldron commented 8 months ago

If you look at this custom GL3RealizeOperation it does various things that you need for a successful GL3/GLCORE context. I don't recall whether this was in 2.10, but maybe the code will help you.

Good luck!