<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Robert<br>
</p>
<br>
<div class="moz-cite-prefix">On 21.08.2017 17:43, Robert Osfield
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFN7Y+Wvk6QqaRQdq-+i+BfJvjFaHRhRb8X=zoGdQ2PTnJgfuQ@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">
<div>What GL version is osgEarth now depending upon?<br>
</div>
</div>
</div>
</blockquote>
A quick grep through the codebase shows shaders depending on GLSL up
to 430.<br>
<br>
<blockquote type="cite"
cite="mid:CAFN7Y+Wvk6QqaRQdq-+i+BfJvjFaHRhRb8X=zoGdQ2PTnJgfuQ@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>From an end users perspectives lack of compatibility
profile is a constraint, if it weren't you wouldn't have
had any problems. From what you describe it may well be a
temporary constraint.<br>
</div>
</div>
</div>
</div>
</blockquote>
I can't speak for the mesa developers, though search a bit one can
read various statements here and there, including "A long time ago,
a decision was made for Mesa not to increase the advertised
compatibility profile version."
(<a class="moz-txt-link-freetext" href="https://bugs.freedesktop.org/show_bug.cgi?id=96449#c5">https://bugs.freedesktop.org/show_bug.cgi?id=96449#c5</a>), so does not
sound too temporary.<br>
<br>
<blockquote type="cite"
cite="mid:CAFN7Y+Wvk6QqaRQdq-+i+BfJvjFaHRhRb8X=zoGdQ2PTnJgfuQ@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">Are you building the OSG with
defaults? Or are you building the OSG for just GL3?<br>
</div>
</div>
</div>
</blockquote>
%cmake -DBUILD_OSG_EXAMPLES=ON -DBUILD_DOCUMENTATION=ON
-DOSG_GL1_AVAILABLE=ON -DOSG_GL2_AVAILABLE=ON
-DOPENGL_PROFILE=GLCORE -DOPENGL_HEADER1="#include <GL/gl.h>"<br>
<br>
<blockquote type="cite"
cite="mid:CAFN7Y+Wvk6QqaRQdq-+i+BfJvjFaHRhRb8X=zoGdQ2PTnJgfuQ@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>What viewer are using with osgEarth? osgEarth itself
is typically used as NodeKit with end user application
creating their own viewer and with it graphics contexts.
This means even if osgEarth's own example programs changed
the way they create graphics context you'd end up with
issues.<br>
</div>
</div>
</div>
</div>
</blockquote>
Running with osgearth_viewer, I get two calls to
osgViewer::GraphicsWindowX11::init. The first one where, I assume,
it tries to determine the capabilities of hardware/driver in use,
and this calls Traits without a DisplaySettings instance:<br>
<br>
#0 osgViewer::GraphicsWindowX11::init (this=this@entry=0x1004ad330)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osgViewer/GraphicsWindowX11.cpp:915<br>
#1 0x00007f3e23ae4b50 in
osgViewer::GraphicsWindowX11::GraphicsWindowX11 (traits=0x1003760d0,
this=<optimized out>)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/include/osgViewer/api/X11/GraphicsWindowX11:56<br>
#2 X11WindowingSystemInterface::createGraphicsContext
(this=<optimized out>, traits=0x1003760d0)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osgViewer/GraphicsWindowX11.cpp:2269<br>
#3 0x00007f3e241e81b7 in
osg::GraphicsContext::createGraphicsContext
(traits=traits@entry=0x1003760d0)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osg/GraphicsContext.cpp:128<br>
#4 0x00007f3e2350c256 in MyGraphicsContext::MyGraphicsContext
(this=<synthetic pointer>)<br>
at
/usr/src/debug/osgearth-2.9-0.2.git43d4ba5.fc27.x86_64/src/osgEarth/Capabilities.cpp:76<br>
#5 osgEarth::Capabilities::Capabilities (this=0x100390f30)<br>
at
/usr/src/debug/osgearth-2.9-0.2.git43d4ba5.fc27.x86_64/src/osgEarth/Capabilities.cpp:162<br>
#6 0x00007f3e236897a5 in osgEarth::Registry::initCapabilities
(this=0x1002a7af0)<br>
at
/usr/src/debug/osgearth-2.9-0.2.git43d4ba5.fc27.x86_64/src/osgEarth/Registry.cpp:484<br>
#7 0x00007f3e23689829 in osgEarth::Registry::getCapabilities
(this=0x1002a7af0)<br>
at
/usr/src/debug/osgearth-2.9-0.2.git43d4ba5.fc27.x86_64/src/osgEarth/Registry.cpp:468<br>
#8 0x00007f3dfa209486 in osgEarth::Registry::capabilities ()<br>
at
/usr/src/debug/osgearth-2.9-0.2.git43d4ba5.fc27.x86_64/src/osgEarth/Registry:149<br>
#9
osgEarth::Drivers::MPTerrainEngine::MPTerrainEngineNode::MPTerrainEngineNode
(this=0x100a1ac60)<br>
at
/usr/src/debug/osgearth-2.9-0.2.git43d4ba5.fc27.x86_64/src/osgEarthDrivers/engine_mp/MPTerrainEngineNode.cpp:202<br>
[...]<br>
<br>
Then, a second time here:<br>
<br>
#0 osgViewer::GraphicsWindowX11::init (this=this@entry=0x100676840)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osgViewer/GraphicsWindowX11.cpp:915<br>
#1 0x00007f3e23ae4b50 in
osgViewer::GraphicsWindowX11::GraphicsWindowX11 (traits=0x10052c100,
this=<optimized out>)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/include/osgViewer/api/X11/GraphicsWindowX11:56<br>
#2 X11WindowingSystemInterface::createGraphicsContext
(this=<optimized out>, traits=0x10052c100)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osgViewer/GraphicsWindowX11.cpp:2269<br>
#3 0x00007f3e241e81b7 in
osg::GraphicsContext::createGraphicsContext
(traits=traits@entry=0x10052c100)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osg/GraphicsContext.cpp:128<br>
#4 0x00007f3e23a7ab62 in osgViewer::SingleWindow::configure
(this=0x100a2a370, view=...)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osgViewer/config/SingleWindow.cpp:72<br>
#5 0x00007f3e23a7a80a in osgViewer::SingleScreen::configure
(this=<optimized out>, view=...)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osgViewer/config/SingleScreen.cpp:29<br>
#6 0x00007f3e23a75207 in osgViewer::AcrossAllScreens::configure
(this=<optimized out>, view=...)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osgViewer/config/AcrossAllScreens.cpp:48<br>
#7 0x00007f3e23ab79c2 in osgViewer::View::apply
(this=0x7fffffffdb00, config=0x1002a3770)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osgViewer/View.cpp:456<br>
#8 0x00007f3e23ab7b00 in osgViewer::View::setUpViewAcrossAllScreens
(this=<optimized out>)<br>
at
/usr/src/debug/OpenSceneGraph-3.5.7-0.2.gitbfbaeca.fc27.x86_64/src/osgViewer/View.cpp:463<br>
[...]<br>
<br>
using ViewAcrossAllScreens as you anticipated and hence the default
DisplaySettings. Since by default a "1.0" context is created, the
result is:<br>
<br>
FRAGMENT glCompileShader "main(fragment)" FAILED<br>
FRAGMENT Shader "main(fragment)" infolog:<br>
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<br>
<br>
etc.<br>
<br>
If I add<br>
<br>
osg::DisplaySettings::instance()->setGLContextVersion( "4.0" );<br>
osg::DisplaySettings::instance()->setGLContextProfileMask( 0x1 );<br>
<br>
at the beginning of a tweaked osgearth_viewer.cpp@main, things work
(though possibly osgEarth::Capabilities::Capabilities will have
incorrectly determined some things since a "1.0" context was created
there). The same effect can indeed be achieved by using the
environment variables you mention.<br>
<br>
<br>
If I use osgearth_qt_simple, the GL context created by Qt is used,
which I can set up to use the desired version and profile mask, at
which point things will also work with that viewer.<br>
<br>
Best<br>
Sandro<br>
</body>
</html>