User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Qt binding

21 Feb 2017, 00:56

The wglGetCurrentContext returns 0x0, so I guess there shouldn't be any active context at this point. Also Init() and Shutdown() are invoked only once per app run.
This is incorrect then. The IRenderer interface must always be used with an active GL context bound. This is also necessary at initialization and shutdown time.
Since Qt is event driven framework would it be possible to connect IView to some render pending / animation begin event, so I could run the render loop only when needed and stop when UI is steady? In this case I could run noesis renderer on single thread and I think it would solve all current problems including CPU usage and screen flickering when resizing. Just for info Qt handles animations this way.
IRenderer::UpdateRenderTree() returns false if there are no render commands for the next frame. You could use that as an approximation for what you want. Or you could stop doing IView::Updates continuously and do them whenever you send new events to the view. This will break if you have running animations though...

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 57 guests