Imgui and RTTPicker not compatible in osgEarth?

classic Classic list List threaded Threaded
7 messages Options
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Imgui and RTTPicker not compatible in osgEarth?

I'm currently working on an osgEarth application that is using Imgui for the GUI. Everything works fine until I add an RTTPicker to pick objects on the screen with the mouse...

viewer.stopThreading();
picker = new RTTPicker();
picker->setBuffer(1);
viewer.addEventHandler(picker);

// add the graph that will be picked.
picker->addChild(mapNode);

// install a callback that controls the picker and listens for hits.
picker->setDefaultCallback(new PickCallback(false));

viewer.startThreading();


When I add the above code, I get the following assertion when I move the mouse into the window...

Assertion failed: (g.FrameCount == 0 || g.FrameCountEnded == g.FrameCount) && "Forgot to call Render() or EndFrame() at the end of the previous frame?", file c:\osgearth-3.0\src\third_party\imgui\imgui.cpp, line 3562

Are RTTPicker and Imgui mutually exclusive or is there some way I can get them to play together?

I'm running osgEarth 3.0 on Windows.

Any help or feedback would be appreciated...

Shayne
 
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Imgui and RTTPicker not compatible in osgEarth?

Hi Shayne,
Thanks for the information. We will have to investigate further. It would be helpful if you could open an GitHub issue for this, and even more helpful if you could attach a simple .cpp that we can use to reproduce the defect. Thanks!
Glenn Waldron / Pelican Mapping
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Re: Imgui and RTTPicker not compatible in osgEarth?

Glenn,

I can open a GitHub issue on the matter.

To reproduce, I believe it's sufficient to add an RTTPicker to the osgearth_imgui.cpp example.

The aforementioned crash happens if you start up an RTTPicker after the viewer.realize() call. The program also crashes if you start up RTTPicker before viewer.realize() call as well but it's a different crash. In the latter case, it reports that the OpenGL context is already in service followed by a bunch of OpenGL errors.

Shayne
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Re: Imgui and RTTPicker not compatible in osgEarth?

In reply to this post by gwaldron
GitHub issue has been entered...

Shayne
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Re: Imgui and RTTPicker not compatible in osgEarth?

In reply to this post by gwaldron
Just a follow-up here, did the issue of getting ImGui and the RTTPicker to play together ever get resolved?
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Imgui and RTTPicker not compatible in osgEarth?

Glenn pushed a change to the osgearth_pick example last week that should hopefully fix it.  Give the master a shot and see how it goes.

Jason

On Mon, May 24, 2021 at 11:26 AM 2LR [via osgEarth] <[hidden email]> wrote:
Just a follow-up here, did the issue of getting ImGui and the RTTPicker to play together ever get resolved?



If you reply to this email, your message will be added to the discussion below:
http://forum.osgearth.org/Imgui-and-RTTPicker-not-compatible-in-osgEarth-tp7593705p7593856.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.
NAML
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Re: Imgui and RTTPicker not compatible in osgEarth?

Thanks Jason. I'll give it a whirl.