Problem with REX terrain engine

classic Classic list List threaded Threaded
11 messages Options
Xtof Xtof
Reply | Threaded
Open this post in threaded view
|

Problem with REX terrain engine

Hi all,

I've built my application (projected map) with the version 2.9 of osgEarth, and still have issues with REX engine.

1. REX engine is much slower than MP engine.
2. When using osgviewerMFC (OSG example based on MainFrame / ChildView), the view appears completely black. This is not the case when using MP engine (same code, options, resources, except the terrain engine).
3. When using osgViewer::setUpViewInWindow(), the terrain is well displayed but only the first time. If osgViewer is called twice, the terrain is not displayed anymore the second time. This is not the case when using MP engine (same code, options, resources, except the terrain engine).

Do I miss something?

Thanks,
Christophe
MCA4213 MCA4213
Reply | Threaded
Open this post in threaded view
|

Re: Problem with REX terrain engine

Hi,  I have the same problems with REX and QT, always the black screen. But, this can be solved by adding viewer.realize() after  viewer.setSceneData . I think that this will resolve your problem with MFC.
Others problems appear after getting the viewer in the window, as aspect  ratio, wrong position, some parts still in black, ....!!!!  



For persons like me, that use osgEarth in another GUI (as Qt, MFC), the REX engine is still far from the MP engine. Many things as you mentioned don't work as expected.

I hope that these issues will be corrected so we can use the new features in REX because as gwaldron has explained "The MP terrain engine will remain, but we don't anticipate any further development".
 
Similar thread:  http://forum.osgearth.org/Report-The-latest-osgEarth-code-problem-td7590331.html
Philippe Renon Philippe Renon
Reply | Threaded
Open this post in threaded view
|

Re: Problem with REX terrain engine

There is a github issue to track this problem : https://github.com/gwaldron/osgearth/issues/853

And apparently osx has a similar issue : https://github.com/gwaldron/osgearth/issues/1052

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

Re: Problem with REX terrain engine

In reply to this post by MCA4213
I'm already using osgViewer::Viewer::realize() after osgViewer::Viewer::setSceneData(osg::Node*), but this doesn't solve my problem with black screen in MFC context!
Philippe Renon Philippe Renon
Reply | Threaded
Open this post in threaded view
|

Re: Problem with REX terrain engine

I have a fix on its way. But it requires a change to OpenSceneGraph.

I am currently searching if a workaround exists that does not require to change OSG.

Anyways, if you can recompile OSG my wip fix is here : https://github.com/filnet/OpenSceneGraph/commit/7f412eae2a9f62652903e69a6df9e2b3bf22503d
Xtof Xtof
Reply | Threaded
Open this post in threaded view
|

Re: Problem with REX terrain engine

Thanks a lot Philippe, but I don't wanna to change OSG, so I'll wait for an official fix from Pelican.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Problem with REX terrain engine

In reply to this post by Philippe Renon
Intersting - can you explain this fix?
Glenn Waldron / Pelican Mapping
MCA4213 MCA4213
Reply | Threaded
Open this post in threaded view
|

Re: Problem with REX terrain engine

In reply to this post by Philippe Renon
Thank you very much,

I tested your fix on Windows 10 and Visual Studio 2015 by commenting the "glDrawBuffer( GL_NONE );" and now: The REX engine is working fine on my Qt application.

Thanks again for sharing the fix.
remoe remoe
Reply | Threaded
Open this post in threaded view
|

Re: Problem with REX terrain engine

In reply to this post by Philippe Renon
I have also fixed something similar on MacOSX in the past. But I haven't understand the reason :)

Cheers
Remo Eichenberger, Switzerland
Philippe Renon Philippe Renon
Reply | Threaded
Open this post in threaded view
|

Re: Problem with REX terrain engine

@gwaldron I'll provide an explanation for the fix (and how i found it) in the related github issue.
I need to validate a few things first.

But the piece of code that is causing the issue was added a few year ago to make a particular opengl driver happy.

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

Re: Problem with REX terrain engine

In reply to this post by Xtof
I have described an alternative fix/workaround for the issue that could be used in one's code : https://github.com/gwaldron/osgearth/issues/853