osgEarth 2.8+ on mesa (intel)

classic Classic list List threaded Threaded
1 message Options
smani smani
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

osgEarth 2.8+ on mesa (intel)

This post was updated on .
I've been trying to get osgEarth 2.8 and also todays git master running on Linux with mesa:

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.2
OpenGL core profile shading language version string: 4.50

The first issue is that Mesa does not support the compatibility profile, and unless I explicitly require the core profile, shaders fail to compile with

0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES

This can be solved i.e. when using osgEarth::QtGui::ViewWidget, by passing an appropriate QGLFormat:

QGLFormat glFormat;
glFormat.setVersion( 3, 3 );
glFormat.setProfile( QGLFormat::CoreProfile );
QWidget* viewWidget = new osgEarth::QtGui::ViewWidget(view, glFormat);

With this, the shaders compile fine, but i.e.

OSG_GL_ERROR_CHECKING=ON ./osgearth_qt_windows /usr/share/osgearth/tests/skyview1.earth

just renders a blue background with tons of

Warning: detected OpenGL error 'invalid operation' at start of State::apply()

and apitrace reporting

major api error 30: GL_INVALID_OPERATION in glVertexAttribPointer(no array object bound)

Has anyone debugged this and had any luck running running recent osgEarth with intel/mesa?