OpenGL restore state after xamlRenderer->Render()
Hi there,
I am evaluating NsGUI at the moment for video application plugin GUI. The plugin runs inside the host application and I am given OpenGL 2.0 context to draw my HUD to. I've got NsGUI up on the screen fairly easy but it seems to mess up GL state that when I switch off HUD host's OpenGL context is damaged.
Does NsGUI preserve OpenGL state after the rendering? Do I need to set up specific flags to force it do so? What state if affected by NsGUI Render()?
Many thanks,
Dmitry Lavrov
I am evaluating NsGUI at the moment for video application plugin GUI. The plugin runs inside the host application and I am given OpenGL 2.0 context to draw my HUD to. I've got NsGUI up on the screen fairly easy but it seems to mess up GL state that when I switch off HUD host's OpenGL context is damaged.
Does NsGUI preserve OpenGL state after the rendering? Do I need to set up specific flags to force it do so? What state if affected by NsGUI Render()?
Many thanks,
Dmitry Lavrov
Re: OpenGL restore state after xamlRenderer->Render()
We do not preserve the GPU state because it is not efficient doing that at our side (we need to invoke get* functions). But this have been requested so many times that we are considering adding it to v1.3, probably as an optional flag or something similar.
Meanwhile, here you can find the GL state restorer being used in the Leadwerk integration:
https://github.com/FourthQuarter/Noesis ... LState.cpp
Thanks!
Meanwhile, here you can find the GL state restorer being used in the Leadwerk integration:
https://github.com/FourthQuarter/Noesis ... LState.cpp
Thanks!
Re: OpenGL restore state after xamlRenderer->Render()
Ok that works! Thank you very much.
Dmitry
Dmitry
Who is online
Users browsing this forum: No registered users and 2 guests