Report:The latest osgEarth code problem

classic Classic list List threaded Threaded
13 messages Options
ago ago
Reply | Threaded
Open this post in threaded view
|

Report:The latest osgEarth code problem


The latest osgEarth code (2017.1.11), with qt environment, does not support rex engine,show a black window,please help me,Thanks.

SXEarth,a free osgEarth GUI Editor and Flight Simulation.

Email: seegogo@126.com
SXEarth download: http://www.sxsim.com/en/

ago ago
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

Another problem,roads.earth with world.shp, only show road texture, flat road not appear.

SXEarth,a free osgEarth GUI Editor and Flight Simulation.

Email: seegogo@126.com
SXEarth download: http://www.sxsim.com/en/

MCA4213 MCA4213
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

In reply to this post by ago
Hello,
Sorry to ask about an old topic, but , did you find any solution to make rex engine work on osgEarth::QtGui::ViewerWidget??? I am facing the same black screen as you.

Thanks in advance.
ago ago
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

The problem still exists with today's osgEarth trunk code,
You needs to add this line of code. viewer.realize();

New problems is the earth is stretched.
SXEarth,a free osgEarth GUI Editor and Flight Simulation.

Email: seegogo@126.com
SXEarth download: http://www.sxsim.com/en/

MCA4213 MCA4213
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

Thanks for the explanation.
Philippe Renon Philippe Renon
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

@ado, could you tell us where to add that call to viewer.realize(); in order to have osgearth_qt_simple and rex working ?
ago ago
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem


    After this line of code in the osgearth_qt_simple.cpp.

    viewer.setSceneData( node );
    viewer.realize();
SXEarth,a free osgEarth GUI Editor and Flight Simulation.

Email: seegogo@126.com
SXEarth download: http://www.sxsim.com/en/

Philippe Renon Philippe Renon
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

Thanks ago.

With the suggested code change, osgviewer_qt5_simple shows the globe but on the desktop and not in the window. Aspect ratio is correct though.



Philippe Renon Philippe Renon
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

The above results with Qt 5.1.0 / osg master / osgEarth master and osgQt 3.5.7.
ago ago
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

Multiple monitors will be displayed on the desktop, no problems with a single monitor.
SXEarth,a free osgEarth GUI Editor and Flight Simulation.

Email: seegogo@126.com
SXEarth download: http://www.sxsim.com/en/

Philippe Renon Philippe Renon
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

Ago, by unplugging the second monitor I can reproduce your result.

So with the "early" realize() call and two monitors the globe shows on the desktop.
With the early realize() call and one monitor the globe shows in the expected window but aspect ratio is wrong.
And without the early realize() we get a black window.
That's crazy... ;)

The early realize() call should not be necessary as the osgEarthQt::ViewerWidget will create and set a GraphicsContext on the osg viewer that it is given.

Note that without the early realize call, the rex globe does not show but it is there. Enabling logging shows that rex is loading tiles and reacting to mouse events.
Pressing 'S' dumps some stats to the console.
What's also strange is that the Stats HUD does not show when pressing 's'. I can understand that rex fails to render but the HUD !?!

And finally, the mp engine works fine. Globe is there in the window, Stats HUD works, ...
Andreas Roth Andreas Roth
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

Are you trying use a fullscreen window with Qt5?

There's an issue with fullscreen Qt windows when OpenGL is used (caused by the Windows DWM). See
http://doc.qt.io/qt-5/windows-issues.html
Philippe Renon Philippe Renon
Reply | Threaded
Open this post in threaded view
|

Re: Report:The latest osgEarth code problem

Hi Andreas,

We are trying to get rex to work within a Qt window (not full screen).
But thanks anyways.

Philippe.