gwaldron / osgearth

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

Use TECHNIQUE_GPU cause a null pointer in function setArray "vad is nullptr" of osg/VertexArrayState.cpp #2524

Closed luoxiaozhu closed 3 months ago

luoxiaozhu commented 3 months ago

osgEarth Version (required): [osgEarth] [Capabilities] osgEarth Version: 3.5.0 build 151 [osgEarth] [Capabilities] GDAL Version: 3.8.5 [osgEarth] [Capabilities] OSG Version: 3.6.5 [osgEarth] [Capabilities] OSG GL3 Features: no [osgEarth] [Capabilities] OSG FFP Available: yes [osgEarth] [Capabilities] CPU Cores: 20 [osgEarth] [Capabilities] GL_VENDOR: NVIDIA Corporation [osgEarth] [Capabilities] GL_RENDERER: NVIDIA GeForce RTX 3060/PCIe/SSE2 [osgEarth] [Capabilities] GL_VERSION: 4.6.0 NVIDIA 472.12 [osgEarth] [Capabilities] GL CORE Profile: no

What is the problem? when i run the code osgearth_viewer annotation.earth with powershell, i found the window show but disappear immediately.so i try to debug the example osgearth_annotation, i found the bug like the title described , so i try to find out what happened. At last,i found if i change the path created code from "pathStyle.getOrCreate()->technique() = AltitudeSymbol::TECHNIQUE_GPU;" to "pathStyle.getOrCreate()->technique() = AltitudeSymbol::TECHNIQUE_DRAPE;", and then Program running. i don't know Whether the problem is caused by the TECHNIQUE_GPU

How have you tried to resolve it?

Help US help YOU: include a screenshot, code block, or data file that we can use to reproduce the issue!

gwaldron commented 3 months ago

I was not able to reproduce locally. The only difference is that I have OSG built with the GL3 profile; maybe that is the issue. In any case I would not recommend using GPU clamping in your application; it is a tricky feature that does not always work well.

luoxiaozhu commented 3 months ago

OK,I'll take your advice,thank you all the same