Wanderer
Topic Author
Posts: 168
Joined: 08 May 2017, 18:36

Re: Panda3D and Noesis integration (problems)

02 Dec 2018, 16:34

I resolve crash with this code
if (m_NS_IView != nullptr)
	{
		m_NS_IView->GetRenderer()->Shutdown();
		m_NS_IView.Reset();
		m_NS_FramElm.Reset();
		m_NS_Theme.Reset();
		m_NS_RenderDevice.Reset();
	}
	Noesis::GUI::Shutdown();

Tags:
 
Wanderer
Topic Author
Posts: 168
Joined: 08 May 2017, 18:36

Re: Panda3D and Noesis integration (problems)

02 Dec 2018, 18:35

I found problem what cause problem!
m_NS_IView->SetIsPPAAEnabled(true);
When I set it to false, Panda3D is rendered correctly without any black object. In Noesis 2.1 I can set SetIsPPAAEnabled true without this problem, but in Noesis beta not.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Panda3D and Noesis integration (problems)

02 Dec 2018, 22:23

I resolve crash with this code
Yeah, that's what I was telling you. Avoiding deletes when using our smart pointers.
When I set it to false, Panda3D is rendered correctly without any black object. In Noesis 2.1
For PPAA we use alpha blending. Could it be that this state is not properly restored when rendering with Panda3D? Is there a way in Panda to save and restore the GL state?
 
Wanderer
Topic Author
Posts: 168
Joined: 08 May 2017, 18:36

Re: Panda3D and Noesis integration (problems)

03 Dec 2018, 12:38

I resolve crash with this code
Yeah, that's what I was telling you. Avoiding deletes when using our smart pointers.
But under 2.1 final it still crash, uner new 2.2beta4 it is ok.
For PPAA we use alpha blending. Could it be that this state is not properly restored when rendering with Panda3D? Is there a way in Panda to save and restore the GL state?
I give response to Panda3D developers. They will know what they have under hood, thanks for notice.
 
Wanderer
Topic Author
Posts: 168
Joined: 08 May 2017, 18:36

Re: Panda3D and Noesis integration (problems)

03 Dec 2018, 18:35

From Panda developers, they restore OpenGL. They asked "which OpenGL calls they are making when SetIsPPAAEnabled is set?" . Is the function inside GLRenderDevice? If yes, which function? I found only BeginRender() call InvalidateStateCache() where I found some glBlendFunc(). Is it that?
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Panda3D and Noesis integration (problems)

05 Dec 2018, 11:34

All GL state changes happen between BeginRender and EndRender, but those functions call more functions so you need to inspect all GLRenderDevice implementation to track issues. Another option would be implementing a new RenderDevice using Panda3D renderer.

Regarding SetIsPPAAEnabled, that function does not belong to the renderer and it doesn't make changes to GL. When that flag is enabled, extra geometry is generated to enable cheap antialiasing. That extra geometry is rendered with alpha blending enabled. But that's not the only path using alpha blending. Just a transparent rectangle should reproduce the same issue, if this is related to alpha blending at all.

Who is online

Users browsing this forum: No registered users and 0 guests