Closed gfyrtuwcv closed 1 month ago
I pulled up the latest code rebuild, the ModelLayer shading error is resolved! But the black model still appears after adding the code, is there a way to make them both work correctly?
QSurfaceFormat format = QSurfaceFormat::defaultFormat();
#ifdef OSG_GL3_AVAILABLE
format.setVersion(3, 2);
format.setProfile(QSurfaceFormat::CoreProfile);
format.setRenderableType(QSurfaceFormat::OpenGL);
format.setOption(QSurfaceFormat::DebugContext);
qDebug() << QObject::tr("OPENGL3");
#endif
format.setDepthBufferSize(24);
//format.setAlphaBufferSize(8);
format.setSamples(8);
format.setStencilBufferSize(8);
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
QSurfaceFormat::setDefaultFormat(format);
I'm confused. Does your model display correctly with osgearth_imgui and an earth file? Does your problem only happen in a Qt environment?
Leaving the Qt environment to directly load earth files or code stars is no problem, imgui I have not tried
We are not Qt experts so lets hope someone else in the community can help you.
There is a chance this was fixed in a recent commit. Please give it another try and report back.
I wasted some time building osgEarthCesium by using the wrong Cesion-main, but successfully built with 37.0 under release. The ModelLayer texture loaded smoothly, this issue has been fixed!
osgearth 版本 [osgearth info] Hello, world. [osgearth info] [Capabilities] osgEarth Version: 3.6.0 build 158 [osgearth info] [Capabilities] GDAL Version: 3.8.5 [osgearth info] [Capabilities] OSG Version: 3.6.5 [osgearth info] [Capabilities] OSG GL3 Features: yes [osgearth info] [Capabilities] OSG FFP Available: no [osgearth info] [Capabilities] CPU Cores: 8 [osgearth info] [Capabilities] GL_VENDOR: NVIDIA Corporation [osgearth info] [Capabilities] GL_RENDERER: Quadro K2200/PCIe/SSE2 [osgearth info] [Capabilities] GL_VERSION: 3.3.0 NVIDIA 516.94 [osgearth info] [Capabilities] GL CORE Profile: yes [osgearth info] Goodbye. Use osgqt with qt5. When I add a string of code to make sure the sky layer is displayed correctly
add the osgb model using ModelLayer, the enlarged model displays this message: Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..) and this is what the model looks like:
Even if you remove this code the model shader will not work correctly:
I added osgb model code: