Page 1 of 2

Panda3D and Noesis integration (problems)

Posted: 26 Nov 2018, 17:02
by Wanderer
Hello

I integrated Noesis 2.1 in to panda. Not fully only GUI rendering. Which render fine, until I change to Noesis beta. I use OpenGL is there something new in OpenGL rendering? Because it cause problems under Panda3D engine.

Another problems are, it crashes evrytime I exit window (Noesis 2.1 or new beta).

this is how I end Noesis:
if (m_NS_IView != nullptr)
	{
		m_NS_IView->GetRenderer()->Shutdown();
		m_NS_IView.Reset();
		delete m_NS_IView;
		delete m_NS_FramElm;
		delete m_NS_Theme;
		delete m_NS_RenderDevice;
		Noesis::GUI::Shutdown();
	}

Re: Panda3D and Noesis integration (problems)

Posted: 27 Nov 2018, 11:53
by jsantos
Those deletes look suspicious to me, are those Ptr instances? You should never destroy smart pointers like that. Let them destroy automatically or force a premature destroy by doing a Reset(). Please, read the C++ Architecture Guide carefully.
Because it cause problems under Panda3D engine.
Could you please elaborate about those problems?

Re: Panda3D and Noesis integration (problems)

Posted: 27 Nov 2018, 14:42
by Wanderer
I delete all "delete" code, but it is still crash on exit. And yes I have all Noesis objects as Ptr<>
Could you please elaborate about those problems?
Please look at this topic, on last screenshot where are black billboards, which cause new Noesis beta.
https://discourse.panda3d.org/t/help-wi ... c/24149/19

Re: Panda3D and Noesis integration (problems)

Posted: 27 Nov 2018, 18:55
by jsantos
That's probably related to a new state that noesis is setting and panda is not restoring. Could you please make a diff between the working GLRenderDevice.cpp you tried and the new one?

Re: Panda3D and Noesis integration (problems)

Posted: 27 Nov 2018, 19:21
by Wanderer
Could you please make a diff between the working GLRenderDevice.cpp you tried and the new one?
I quite don't understand what you mean "make diff". Working GLRenderDevice is from Noesis 2.1.0f1 and not working is from 2.2.0b3 version. (if this is what your question means)

Re: Panda3D and Noesis integration (problems)

Posted: 27 Nov 2018, 19:57
by jsantos
Yes, I mean, finding the differences in GLRenderDevice between 2.1 and 2.2 to discover the new GL states that could be affecting to Panda.

Re: Panda3D and Noesis integration (problems)

Posted: 28 Nov 2018, 13:24
by Wanderer
This is impossible task for me. I am sorry. I don't know graphics (OpenGL) programing.

Re: Panda3D and Noesis integration (problems)

Posted: 30 Nov 2018, 00:53
by jsantos
I did it for you. Here you can find the differences between 2.1 and 2.2 in the GL renderer implementation:


Inspecting the changes I cannot find an explanation to the black screen. No extra GL state is affected.

Re: Panda3D and Noesis integration (problems)

Posted: 30 Nov 2018, 11:29
by Wanderer
Thank you very much. I'll show your difference code to Panda3D creators, maybe they will know where is problem. Thanks.

Re: Panda3D and Noesis integration (problems)

Posted: 30 Nov 2018, 11:42
by jsantos
Probably, best thing you can show them to understand the integration is the minimal GL sample