gwaldron / osgearth

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

TexEnv not supported #2564

Closed devil-darkside closed 2 months ago

devil-darkside commented 2 months ago

osgEarth Version (required): 3.5.0 build 152

What is the problem? I receive the following "Warning: TexEnv::apply(State&) - not supported." when loading any model with at least one texture applied.

How have you tried to resolve it? I've used the "feature_model_scatter.earth" to test different 3D models. If I use the trees.osg from the osgearth distribution I receive the following: "Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)" instead of "Warning: TexEnv::apply(State&) - not supported."

I've put in the triplets file the "set (osg_OPENGL_PROFILE GL3)"

[osgearth info] Hello, world. [osgearth info] [Capabilities] osgEarth Version: 3.5.0 build 152 [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: 40 [osgearth info] [Capabilities] GL_VENDOR: NVIDIA Corporation [osgearth info] [Capabilities] GL_RENDERER: Quadro RTX 8000/PCIe/SSE2 [osgearth info] [Capabilities] GL_VERSION: 3.3.0 NVIDIA 536.96 [osgearth info] [Capabilities] GL CORE Profile: yes [osgearth info] Goodbye.

tree.zip

devil-darkside commented 2 months ago

Same messages are displayed using "powerline.earth"

gwaldron commented 2 months ago

When fixed-function pipeline (FFP) rendering is not available, OpenSceneGraph will print these warnings to the console when it encounters a state attribute that only works with FFP. There's not really a good way to squelch them without either turning off logging altogether or by altering the model to remove the unsupported attributes.

One could make the argument that the osgEarth shader generator could remove these attributes after generating shaders for them. You could take a look at ShaderGenerator.cpp and see whether this option makes sense?

gwaldron commented 2 months ago

FYI, I pushed an update the should squelch some of these messages when using the shader generator.

gwaldron commented 2 months ago

commit 9ee1add9b

devil-darkside commented 1 month ago

I've tried the new version and it is much better now. It is also better than redirecting the errors to null. I'll try now to remove the other warning remaining on LightPointDrawable.